I am developing a C#/SQL ASP.NET web application in VS 2008. Currently I am using the Server.Transfer method to transfer control from one ASPX.CS file to another ASPX file. The first time through, this works. But after control is transferred to this new file it encounters a condition:
if (restart == false)
where "restart" is a boolean variable. After this statement it immediately transfers control back to the same ASPX.CS file and tries to reexecute the Server.Transfer method. This time it gives me the following exception and stack trace. Do you know what is causing this? I tried to read this but it didn't make much sense to me.
System.Web.HttpException was unhandled by user code
Message="Error executing child request for DataMatch.aspx."
at System.Web.HttpServerUtility.Execute(String path, TextWriter writer, Boolean preserveForm)
at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
at System.Web.HttpServerUtility.Transfer(String path)
at AddFileToSQL._Default.btnAppend_Click(Object sender, EventArgs e) in C:Documents and SettingsAdminMy DocumentsVisual Studio 2008ProjectsAddFileToSQLAddFileToSQLDefault.aspx.cs:line 109
I have a class which implements IHttpHandler that is designed to handle image resize requests. It handles Urls like so [URL] Currently the handler looks for myimg.jpg on disk, cuts a 100x100 thumbnail (if it isn't already present) and redirects the client to the thumbnail like so Response.RedirectPermanent("/some/virtualPath/to/thumbnail.jpg");
This has been working great, but I would like to avoid forcing the client to issue a second HTTP request. Is it safe to do the following? Server.Transfer("/some/virtualPath/to/thumbnail.jpg") All the MSDN documentation talks about using Server.Transfer() to redirect to an aspx page, so I'm not sure if this is the right thing to do or not.
This bug is very difficult to troubleshoot. I run 4 apps on the same server, all 4 are clones from the first one, just differ on their database connection. 2 run perfectly, but on two of them, when making a postback from a certain page, by clicking a button or by changing a datagrid page, it throws this error:
how to transfer my data from devlopment server to production server ,i have already records exist in my database if i go for script then how can i transfor record in script i can transfor only table ,procedure and views.I am using SqlServer 2005.
I have a large dataset (35,000+ rows) that I need to export to excel and then let the user download. I have done this the conventional way (with a gridview), but the data has grown, causing a OutOfMemoryException on the web server.
So I thought, would it not be better if I can export the data into excel on the sql server, and then transfer this data to the web server.
Note that this is not a one-off job. This will be ran regularly (twice a month), but the user. Hence I need something that the user can initiate.
I would love to create a "daemon" which in specified time intervals will move-transfer any zip files uploaded by the users from a.example.com to b.example.com
From the info i gathered so far,
The daemon will be an .ashx generic handler. The daemon will be triggered at the specified time intervals via a plesk cron job The daemon (thanks to SLaks) will consist of two FtpWebRequest's (One for reading and one for writing).
So the question is how could i implement step 3?
Do i have to read into to a memory() array the whole file and try to write that in b.example.com ? How could i write the info i read to b.example.com? Could i perform reading and writing of the file at the same time?
No i am not asking for the full code, i just can figure out, how could i perform reading and writing on the fly, without user interaction.
I mean i could download the file locally from a.example.com and upload it at b.example.com but that is not the point.
We have developed one Web Application which is running in only one server. Now client needs our application be in two servers. So if one of the servers down then another server should be working. We are using sessions in our application. Now the problem is how to transfer the session data from one server to another??
I'm trying to send a string of XML as part of the query string. Normally I'd POST this XML but I'm sending it to a 3rd party system that I can't POST stuff to. So, as it goes, I need the 3rd party system to request the services of one of the pages in my system. (explanation: the 3rd party system produces PDFs of my web pages. I give it a URL to my page, and it PDF's that page. So, the XML file contains data that I need to generate the page) Anyway, I'm getting my query string as follows:
Using vb.net/asp.net 2005. in the global.asax page in the application error page I am getting the exception information as follows:
To find out when there are any exceptions when users are using the system, then the ErrorDetails are being auto-emailed to members on the IT team to help in troubleshooting. The problem is this: I want to find out what page is the user is on when the exception happens, sometimes the stacktrace does not list the aspx page. Does anyone know how to get this information?
I have an asp.net web page which works with a database. When I first upload it I never disposed the connections so after using the different modules of the application for sometime it would suddenly stop working saying the connection pool filled or something like that.To fix it when a user clicked a button I opened the connection, tell the database what I needed and finally disposed the connection.
This seemed to fix everything, in fact you can work with application all you want, the problem comes if you stop using it for certain time.So for instance, I have a module in my webpage where user can capture information for a certain product. When the user clicks in one button the info gets into the database. If the user is continuosly capturing data everything works fine, but if it goes for about 10 min when he clicks the button he will receive an error. To fix this the user has to log-in again.
Every module opens a connection to the database to verify the user identity, but then after it verifies it I dispose the connection so I don't think there is a problem.
If I need to redirect a user from one page to another, should I use redirect or go with server.transfer? I'm assuming redirect. The idea is to give the users one specific URL and then have that URL redirect to the most current iteration of the page. For example, the user may have [URL] as the URL but the actual page served to them would be [URL]
If a user enters "<" or if it already exists in a textbox inside an update panel, I am getting "internal server error 500" during post back. I believe the page suspects a HTML injection and is attempting to stop it. I could use Page.EnableEventValidation to avoid it but I really don't want to do that. Is there any other way, I could resolve it (like replace < with > or something like that)?
I am having a problem with the correct dateTime. Currently I have an application that pumps data into my Microsoft SQL 2005 database. But the dateTime that gets inserted is in the format of, 12 Oct 2010 21:30:24 GMT.How can i change this on the Sql Database on the backend to the correct format?
I have a web page which is using PasswordRecovery control.Its working fine but I have a scenario in which I have to disable Viewstate for the whole application.Now after disabling viewstate when I visit the webpage I have noticed that PasswordRecovery controls is not working (Every times when I submit the default button to go to step 2, the postback occur but not moving to step 2).
A first chance exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll An exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll but was not handled in user code
For now i just put a try catch on the server.transfer although the exception will not affect the application even if i don't use try catch. I also see that the exception is happening again even if i put try catch but with different dll: A first chance exception of type 'System.Threading.ThreadAbortException' occurred in App_Web_benglxq1.dll An exception of type 'System.Threading.ThreadAbortException' occurred in App_Web_benglxq1.dll but was not handled in user code Now what on earth is benglxq1.dll i don't know. What i know is that i'm leaving an exception to run and i don't like that. This is the js error when i use server.transfer btw: Microsoft JScript runtime error: Sys.ArgumentTypeException: Object of type 'Sys._Application' cannot be converted to type 'Sys._Application'.
I have one website running on one server and another web application running on another server. My web application asks for username/password to login into the system. I need to put a username/password field on my website so that user can directly login from website. how to transfer these username/password values to the web application running on another server?
I have a custom error handler in the global.asax's Application_Error method, when an error occurs I use the following code to transfer user to the error page:Server.Transfer("/Error/");
However without specifying the actual page name the code above breaks with "Error executing child request for /Error/" exception.So if I use Server.Transfer("/Error/Default.aspx") it works fine with no problems.Also using Response.Redirect("/Error/") works fine too, however we want to keep using Server.Transfer to retain URL displayed in the address bar when the error page is displayed so users can simply refresh the page to retry accessing the original offending URL.Would be grateful if anyone can comment on how to get the Server.Transfer method working without specifying the actual aspx page name.
Currently we are using query-string extensively in our asp.net application. Few days back we were working on enhancing the website. In this we first of all decided not to show the complete url of the webpage on the address bar for this i asked this question regarding it on SO
The best way we got was to use server.transfer(). But now it seems that the query-string does not work with it! Is there a way around this so we may use query-strings and do not display the url of the webpage on the address bar.
If I use Server.Transfer(www.example.com/test/abc.aspx); It is giving and error and saying to give a virtual path. But In DotNetNuke applications they do not have virual paths. So how can I use this feature and i there any alternation for the same thing?
I have an shared hosting account with go daddy , but they have recently disabled my account. here is their mail :-
It has come to our attention that your hosting account is causing an overload of the shared CPU resources on this server. This,
in turn, affects the usage of the server by other customers. To protect the overall health of the server, we have suspended the application pool on your account; however, FTP access is still enabled.
Unfortunately, we are not able to troubleshoot custom scripting, and therefore, we are not able to provide specific solutions. You will need to troubleshoot your coding in order to determine what is causing your scripting to use a large amount of resources.
Once you have identified the cause of the issue, please reply directly to this email with the steps taken to resolve the issue and we will re-enable your application pool for monitoring. If you are not able to resolve this issue, you should then consider the need to upgrade to a Dedicated Server.
how to find which script is taking more cpu usage?