Will Server.Transfer Work In A Web Form
Mar 18, 2010I would like to know, wether Server.Transfer will work in a Web Farm.
View 2 RepliesI would like to know, wether Server.Transfer will work in a Web Farm.
View 2 RepliesI have a web application which has a main page and a detail page on which sits an Ajax Calendar extender, if I use Server.Transfer to navigate to the detail page the Calendar extender does not work until I do a post back.
If I use response.redirect everything works fine, is this intended ? or am I missing something
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.
i hve 3 applications with membership providers which are wrking perfectly.. i am storing the users , roles , profiles etc in the same database as for the each application. now i want to store users roles etc in a single db n application data in separate db.. how can i shift existing users from current db to new db without re-creating them ..
View 6 Replieshow 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.
View 2 RepliesI 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.
i have two servers s1 and s2
In s1 we hav an aspx page called test1.aspx
In s2 we hav an aspx page called test2.aspx
In test1.aspx i have a textbox and a button. I enter data in textbox and click the biutton.
Now the data that has been entered should be shown in a label in test2.aspx
test1.aspx and test2.aspx are in two servers...so how to do it ...
how to move a database table from one server to another server database.This is performed
when I click a button in .aspx page like import the table goes and adds to the another server database in web application.
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??
View 7 RepliesIf 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]
View 16 Repliesprotected void btnCancel_Click(object sender, EventArgs e)
{
Server.Transfer("Fix_Details.aspx");
}
Server.Transfer is not redirecting the page. It stays on the page that the button was clicked on. The message is "Error on Page."I tried Response.Redirect and that didn't work either.
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
After banging my head because i could find where the exception came for and global.asax didn't get hit i found that it's from server.transfer and is a known bug. The alternative i read about is server.execute.However if i do this then the next page fires multiple javascript exceptions and a gridview i have is breaking of and the rows appear half at the left page corner and half inside the gridview!!
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?
View 3 RepliesI 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?
View 6 RepliesI 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."
Source="System.Web"
ErrorCode=-2147467259
StackTrace:
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
Why does server.transfer sometimes change the font of the destination page?
View 9 RepliesThis is the very favourate question available on every interview questions site. I have searched for it. But didnt get the satisfactory practical difference between these two. show me the difference between this two through a working sample demo.
View 6 RepliesSometimes when transferring to a different page, I have to use response.redirect instead of server.transfer, and when I do, the name of the page always shows up in the url such as [URL]
I use server.transfer when I can, but unfortunately I haven't found a way to use it unless the transferred page refers back to the parent when leaving.
How can I mask what page is being viewed after doing a response.redirect to another page.
To get the url of the current page, I usually do something like this:string path = Request.Path;If I do this after a Server.Transfer then I get the path of the page where the transfer was done. How can I get it for the current page?For example:
On Page1.aspx I do Server.Transfer ("Page2.aspx")
On Page2.aspx Request.Path returns /Page1.aspx and not /Page2.aspx
1)what is the difference?
2)can u explain also interms of transferring values from page1 to page2.
Why Server.Transfer()is faster than the Response.Redirect(). Can anyone explain in details.
View 6 Repliesas u know, you can call Server.Transfer() or place some values in Session["objName"]=value; inside your page. but i'm writing a class which has not page, so it does not have any Server or Session object.
how can call this objects or methods outside of the page (within my class) ?