VS 2010 Process Continues Unexpectedly
Feb 10, 2011
Here's a very strange thing happening and I need to know how to stop it. y ASP.NET web page uses a JSON Ajax call to call a Webmethod that initiates a number of processes. In the IDE when I step my code. Because I'm only testing the first part of the process, there should be no action against the Database until the 2nd phase. I place a breakpoint at the start of the 2nd phase and then I actually stop debugging by pressing the usual square button. I then look in a table on the DB and records have been processed that should not get processed until much further into my code. Stepping line by line until my breakpoint does not call any update functions to the Database (just in-case I'd placed a call somewhere that I didn't mean to). Can someone tell me what's going on in the IDE? At my breakpoint, depending on how long I leave it sitting at the breakpoint before I actually stop the debugging process has a direct impact on the amount of records I see changed/added in the database.
View 9 Replies
Similar Messages:
Dec 19, 2010
learn to use visual web developer but encountered a problem. I wat to be able to upgrade something and then as the lv goes up the time to do something goes down.
View 2 Replies
Apr 23, 2012
In my css I have defined:
Code:
#overlay
{
position: fixed;
height: 100%;
width: 100%;
z-index: 1000000;
[Code] ...
And then back on my client I have:
Code:
$("#Button1").click(function () {
var fileName = $("#MainContent_FileUpload1").attr("value");
var jsonData = '{ "fileName" : "' + encodeURI(fileName) + '"}';
if (checkFileExtension(fileName)) {
[Code] ...
Why my overlay doesn't display.
View 5 Replies
Dec 17, 2010
I have just the Express version of VS2010 so no option to attach to process. I am developing a custom DotNetNuke module which runs fine by itself, but has problems when running once installed as a module in DNN. Hence I need to attach to the DNN process and see what is going on. I don't have DbgCLR.exe as it looks like they stopped including that in .NET 3.5 Framework...and I don't want to risk installing .NET 2.0 framework and mess up my dev environment.
View 1 Replies
Aug 23, 2010
I've run into a particularly nasty bug where an ASP.NET website attempts to make a call to a WCF service method that sends IIS into a death spiral...that ultimately brings down the associated app pool. It never gets to our log4net code that outputs unhandled exceptions.I was watching w3wp.exe processes spin up and die, so I figured I'd take a dump file on termination using ProcDump from SysInternals using the following command
View 2 Replies
Apr 24, 2010
I have loaded Web Site from HDD. Now trying attach it to process WebDev.WebServer.EXE. But in Visual Studio 2010 Web Developer Express edition of VS not exist tool Attach To Process. Is it normal? if yes,
View 1 Replies
Mar 8, 2011
I have made my 1st asp.net web app in vs2010. I run the app and Firefox opens, showing the page. When I close Firefox, the app continues to be (Running) inside VS2010. I think the app should stop running when I close the browser. Is this right? If so, how can I make VS2010 get out of run mode and back to design mode by itself?
View 6 Replies
Aug 3, 2010
In My asp.net application i have Invoice Entry where in our company daily we are Receving some 40 Invoice or more..
Im showing this 40 Invoice Report in crystal Report.. where user can view one by one in page....
Now whatz the problem is on navigation to next (or) previous in crystal Report Toolbar it cause postback it take lot of time to show 40 invoice daily.. so my manager want without post back, so on clicking next (or) previous it show next Invoice without waiting..
I tried in Ajax Updatpanel also still it takes lot of time to show next Invoice.
View 3 Replies
Feb 11, 2011
I want to start a new thread to query a database while my web application continues running. I was under the impression that by using threads I can run the querying process independently while the normal web application page cycle carries on, but I could be wrong.
public class DbAsyncQuery
{
Dictionary<string, object> serviceResults = new Dictionary<string, object>();
public void UpdateBillingDB()
{
QueryAllServices();
foreach (KeyValuePair<string, object> p in serviceResults)
{
IEnumerable results = (IEnumerable)p.Value;
IEnumerable<object> sessions = results.Cast<object>();
DbUtil.MakeBillingDBEntry(sessions, p.Key);
}
}
public static string[] servicesToQuery = new string[] // Must go in config file ultimately
{
"xxx.x.xxx.xx"
};
public delegate void Worker();
private Thread worker;
public void InitializeThread(Worker wrk)
{
worker = new Thread(new ThreadStart(wrk));
worker.Start();
}
public void InitializeQuery()
{
Worker worker = QueryAllServices;
InitializeThread(worker);
}
private void QueryAllServices()
{
Dictionary<string, DateTime> lastEntries = DbUtil.GetLastEntries();
foreach (string ip in servicesToQuery)
{
string fullServicePath =
"http://" + ip + ":800/MyWebService.asmx";
//object[] lastEntry = new object[] { lastEntries[ip] };
object[] lastEntry = new object[] { new DateTime(2011, 1, 1, 0, 0, 0) };
object obj = WebServiceHandler.CallWebService
(fullServicePath, "MyWebService", "GetBillingDBEntries", lastEntry);
serviceResults.Add(ip, obj);
}
}
}
It seems to basically stall and wait to finish the query before loading the page (which can be thousands of rows, so it takes awhile). I put this in the following section of Global.asax:
protected void Application_Start(object sender, EventArgs e)
{
DbAsyncQuery query = new DbAsyncQuery();
query.UpdateBillingDB();
}
This is one of my first web pages, and I'm new to threading. I understand there is a difference between creating your own thread and using the ThreadPool. In this method, I am using my own thread, I think. Not sure if that's the best way. The querying process can be completely independent, and its only going to occur on scheduled intervals (every 8 hours or so). The user doesn't need to have up to the minute data, so it can take awhile. I just don't want the site to wait for it to finish, if that's possible.
View 1 Replies
Sep 13, 2010
I have a Gridview that shows my data, I allowed it to have Editing and Sorting. I have achieved refreshing my GV with <META HTTP-EQUIV="Refresh" CONTENT="15">. however, when I Edit and it hits the time to refresh, I loose the Edit mode and starts at the beginning of the grid (I need to find the data again.) Is it possible to still have the refresh (15secs) then when Iam in EditMode, the Refresh stops, then after I have clicked UPDATE. the refresh time starts to count again. (i use VB)
View 7 Replies
Sep 7, 2010
I've written a aspx.net(C#) page that after the user has done what they do on the page they hit a Submit button. The Submit button
1) takes the work the users was producing on the page and writes it to a file.
2) attempts to execute a batch file.
The call to the batch file is executed via:
protected void Execute123EDI()
{
try
{
string File = @"c:80sAdminSendV80s.bat";
lblCancelled.Text = lblCancelled.Text + File;
Process proc = new System.Diagnostics.Process();
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.LoadUserProfile = false;
proc.StartInfo.UserName = "administrator";
proc.StartInfo.RedirectStandardOutput = true;
System.Security.SecureString secPass = new System.Security.SecureString();
string paswd = "123abc";
for (int i = 0; i < paswd.Length; i++)
{
secPass.AppendChar(paswd[i]);
}
proc.StartInfo.Password = secPass;
proc.StartInfo.FileName = File;
proc.Start();
FileStream fs = new FileStream(@"c:80sAdminSendV80sOutput.log", FileMode.Append);
StreamWriter sw = new StreamWriter(fs);
sw.Write(proc.StandardOutput.ReadToEnd());
proc.WaitForExit();
sw.Close();
proc.Close();
}
catch(Exception ex)
{
lblDebug.Text = lblDebug.Text + ex.Message + "<br/>";
}
If I watch the processes tab in Task Manager on the web server I see "cmd.exe" under the context of 'administrator' but it just hangs. For test purposes c:SendV80s.bat: copy c: oot.ini c:zzz.txt
If I logon onto the webserver's console and execute SendV80s.bat it works and exits without issue. But when I execute the same batch file via the Submit button it gets stuck executing in Task Manager/Process. I believe this has something to do with the fact that cmd is not running in a full environment/desktop context. I just noticed this on the actual console of the webserver (not in my RDP console but console 0 instead)
A pop-up box stating: CMD.exe Application error The application failed to initialize properly (0xc0000142). Click OK to terminate the application. And when I click on the OK button my ASPX page's WaitForExit is satisfied and the continues processing normally.
View 2 Replies
Jul 21, 2010
I know that similar questions have been asked all over the place, but I'm having trouble finding one that relates directly to what I'm after.
I have a website where a user uploads a data file, then that file is transformed and imported into SQL. The file could be up to 50mb in size, and some times this process can take 30 minutes or sometimes even longer.
I realise I need to palm off the actual work to another process, and poll that process on the web page. I'm wondering what the best approach would be though? Being a web developer by trade, I'm finding all this new Windows Service stuff a bit confusing, and I just wanted somewhere to start.
So:
Can I do / should I being doing this with a windows service? if so, how?
Should I use WCF? If this runs under IIS, will I have problems with aspnet_wp.exe recycling and timing out my process?
clarifications
The data is imported into sql, there's no file distribution taking place.
If there is a failure, it absolutely MUST be reported to the user. The web page will poll every, lets say, 5 seconds, from the time the async task begins, to get the 'status' of the import. Once it's finished another response will tell the page to stop polling for status updates.
queries on final decision
ok, so as I thought, it seems that a windows service is the best idea. So as to HOW to get it to work, it seems the 'put the file there and wait for the service to pick it up' idea is the generally accepted way, is there a way I can start a process run by the service, without it having to constantly be checking a database table / folder? As I said earlier, I don't have any experience with Windows Services - I wondered if I put a public method in the service, can I call it somehow?
View 2 Replies
Feb 26, 2010
I'm working on an ASP.net app I'm trying to execute a process remotely , using System.Diagnostics.Process class here's my code:
ProcessStartInfo startInfo = new ProcessStartInfo(@"C:TestCommand.exe");
startInfo.Domain = "myDomain";
startInfo.UserName = "MyUserName";
SecureString sec = new SecureString();
foreach (char item in "MyPassword")
{
sec.AppendChar(item);
}
sec.MakeReadOnly();
startInfo.Password = sec;
startInfo.UseShellExecute = false;
Process.Start(startInfo);
I keep receiving an exception with the message "Logon failure: unknown user name or bad password". Im absolutelly sure that i'm submiting my correct username/pwd
View 1 Replies
Apr 3, 2010
I've developed a popup email .aspx used on our intranet based web app that is auto generated with .pdf's attached. I'm developing with VS 2008 ASP.Net 3.5 C# and System.Net.Mail.MailMessage. I can create and send the email with no issues. The problem is with any attempt to open or delete the attachments I get the above error. The .pdf's a copied with the following code:
FileStream fsr = new FileStream(inFilename, FileMode.Open, FileAccess.Read, FileShare.Read);
BinaryReader reader = new BinaryReader(fsr);
byte[] bytes = new byte[fsr.Length];
reader.Read(bytes, 0, bytes.Length);
FileStream fsw = new FileStream(outFileName, FileMode.Create, FileAccess.Write, FileShare.Write);
BinaryWriter writer = new BinaryWriter(fsw);
writer.Write(bytes, 0, bytes.Length);
// clean up
writer.Flush();
writer.Close();
writer = null;
fsw.Close();
fsw.Dispose();
fsw = null;
reader.Close();
reader = null;
fsr.Close();
fsr.Dispose();
fsr = null;
Later after sending the email I:
mailMessage.Dispose();
mailMessage = null;
foreach (string fileName in attachments)
{
if (File.Exists(fileName))
File.Delete(fileName);
}
The error occurs at: the File.Delete(fileName);
how I can delete or reopen these files after sending the email?
View 9 Replies
Dec 28, 2010
I have an inline .asmx file that I'm trying to host on GoDaddy. Because of this, I cannot edit the web.config file :(. Either way, I can access [URL] When I try this, I see the service description page that ASP.NET generates. However, when I try to access the method, I receive the "Request format is unrecognized for URL unexpectedly ending" error.
I have not changed the .asmx from what Visual Studio generates. I'm simply trying to access [URL] as described here: [URL]
My question is, is there a way that I can host .asmx files on GoDaddy? From my Googling (or Binging) it seems that I need to edit the web.config file to be able to run this service.
Here is my code:
[Code]....
View 1 Replies
Jun 29, 2010
I have a products page, with a treeview on left, (telerik) and on the right there is a div. The div on the right is used to load stuff in it, (using jquery, calling another aspx with a querystring parameter), called from Telerik Treeview's client-side OnNodeSelecting event ... Everything works as expected. There is also a RadioButton list (asp.net rbl) on top of this page, that is set to AutoPostBack. It switched the current language of the page. In all the other pages, it changes the Language and reloads the page. Then browsing the proıducts is pure client-side by loading into the rihgtmost div, (jquery calling another aspx page with a parameter, and loads the resulting HTML into the div).
What happens is, once I load content into this div, and then try to select another language from the RadioButtonList, whole window redirects to the aspx page that is supposed to provide the content to jQuery load. I have absolutely no clue why that happens.
Code below:
TreeView is actually inside an ascx. The client-side code is
$(document).ready(function() {
loadproduct(getDefaultUrl());
});
function getDefaultUrl() {
var hf = document.getElementById('ctl00_cphContent_hfLastSelectedProductUrl'); ///this is for preserving the state
var url = hf.value;
return url;
}
function UrunMenuNodeClicking(sender, args) {..........
note: the Class MyControl inherits from System.Web.UI.UserControl , and has a property that accesses Session and sets the current language as an integer. Actually it is an enum like Languages.English, I do (int)enum and send it to session ...
View 2 Replies
Mar 1, 2010
I am developing a website and find problems on onunload event.
As the code below, it aims to modify the database when the 'X' of browser is clicked or it navigator to other page. However, when the AAA.aspx is loaded, it is found that end() would be run and already modify the database and change the status as 1, which is not my aim.
AAA.aspx:
<body onunload="<%end();%>">
AAA.aspx.cs: [code].....
View 2 Replies
Dec 14, 2010
I'm using the code below in the we.config file.
<sessionState mode="InProc" cookieless="false" timeout="30"/>
There is no issue with the session expiration locally, but the same web application logouts frequently when I uploaded it to the webserver. The session no longer keep it's state for 30 minutes when the application left idle for some time.
View 1 Replies
May 6, 2010
The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request.
Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.i have started getting this error for my application how do i resolve it til yest it was fine
View 3 Replies
Jun 16, 2010
I've developed a web application to accept video file uploads and then pass them to a backend service on an external server. The application runs without error on the visual studio debugging webserver, but once on a production iis 6 or 7 server, yields a timeout error at about a consistent amount of time into handling a large upload. Specifically, it errors in the middle of transferring the video file to the external server, once the application has successfully received it from the client. I'm aware of several timeouts to be configured related to the problem, and have done so. The application's web config has been tested with one or both of the following settings
<system.web>
<httpRuntime executionTimeout="9999999" maxRequestLength="2048000" />
</system.web>
and
<configuration>
<location path="default.aspx"> (the page at issue that's timing out)
<system.web>
<httpRuntime executionTimeout="9999999" maxRequestLength="2048000" />
</system.web>
</location>
</configuration>
And within the initialization of the webrequest made to the external server to send the video received from the client browser:
HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(url);
httpWebRequest.ContentType = "multipart/form-data; boundary=" + boundary;
httpWebRequest.Method = "POST";
httpWebRequest.Timeout = System.Threading.Timeout.Infinite;
So with the execution time limits on both the webform as a whole and the connection made to the external server, I'm at a loss for what timeout is left unconfigured, or how to determine such, when I continue to get the following error: Unexpected error executing Brightcove Upload:...........................
View 3 Replies
Jan 22, 2010
I am having an issue with a user control that contains a dropdown and a validator. I created a property for the "CausesValidation" property on the dropdown and set it to false. And yet the dropdown is still triggering the validator. I am having issues with this elsewhere as well including on my ModalPopup.
View 3 Replies
Feb 22, 2010
I have a couple of validators on a modal popup. They trigger properly for the controls on the modal. On the main page I have an updatepanel and can commit a save. When I commit a save and go back to the modal popup the validator error messages for both validators appear. Why is this happening and how can I stop it?
View 2 Replies
Dec 20, 2013
i have a problem with webservices on my web forms i am loading the latitude and longitude of a certain location from my database here is the code
<WebMethod()> _
Public Function setmylocation(proid As String) As List(Of locsetter)
Dim constring As String = ConfigurationManager.ConnectionStrings("blottedConnectionString2").ConnectionString
Dim con As New SqlConnection(constring)
Using cmd As SqlCommand = New SqlCommand()
[code]....
View 1 Replies
Dec 25, 2010
Dear ladies and sirs.
I have a .NET infra code running both within the IIS worker process and within a desktop client app. How can the .NET code determine whether it is running within an IIS worker process?
I know that I could check the name of the process (w3wp.exe, for instance), but I would like a more robust approach. I wish to make a side note. This is not a production need. I need this information to enable certain scenarios useful during the development and testing phase. Specifically to ease the testing of secure vs non secure configurations.
View 3 Replies
Jan 26, 2010
When I hit the run button (in my Default.aspx), a process starts (this process contacts a webservice to get some files, etc). How do I: Ensure that only a single process is running at a time (i.e. if I refresh the browser, I don't want to start the process a second time)Track progress - there are 4 points of the process (at 25%, 50%, 75%, 100%) that I want to track, and when each part completes, I want to update the progress bar. I have a status object for the running process, but the question is how to update the progress bar automatically? Do I need to use threads to achieve the above two?
View 1 Replies