Showing posts with label website. Show all posts
Showing posts with label website. Show all posts

Wednesday, March 28, 2012

ASP.NET AJAX not working for me??

Hi,

I am having a problem that is driving me crazy. I currently have my ASP.NET 2.0 website hosted with a hosting company and they claim to have AJAX extensions installed on their servers.

I created an asp.net page, put a simple label and button in an UpdatePanel, set the updatepanel to "Conditional", and yet is still causes a full page refresh when the button is clicked. I tried uploading the same exact page with same web.config to another web server I have and it worked properly there. What could be wrong with the hosted site and how can I fix it?

To further test the hosted site, I added some Controls from the Ajax Control Toolkit, such as Collapsible Panel, and that seemed to be working correctly even though the updatepanel is not. I even uploaded the DLL's to the bin folder.

What else can be causing this problem? I even have a different subdomain with the same hosting provider that seems to be running this page correctly. What settings can you think of that I should mention to the hosting company to fix them. I already alerted them of the problem and they believe they are doing everything correctly and that the problem lies on my side (which makes no sense to me since I know the code is fine since it runs perfectly on other servers).

Please help. Thank you.

First question I would ask is what version of ASP.NET Ajax do they have installed. Methods have moved to different assemblies over time. v1.0.61025 is the latest.

However, you also do not need to rely on them. You can include the DLL necessary and simply reference that from your project. You don't need to rely on GAC installed assemblies. Check your installation on your system for the System.Web.Extensions.dll and reference it. I think you also should remove the web.config lines that refer to the GAC entry. <add assembly= ......, but I haven't tried that to see if is necessary. If they don't have it installed properly, it may cause an error.


Ok, here's the deal. The hostnig company has the latest AJAX installed on their servers. In fact, I have about 5 websites hosted with this company (all on the same server). AJAX is working on 4 websites - just not working on on one site (for exapmple domain5.com). However, if I was to create a virtual directory pointing to that website it works (for example:www.domain4.com/domain5).

Similarly, I have AJAX working on domain4, but if I have a virtual directory on domain5 pointing to it (such aswww.domain5.com/domain4) then it does not work.

What can be causing this problem? I am thinking there must be a setting blocking AJAX on that domain/website. I noticed that this website has Frontpage Extensions installed. I don't know if that has anything to do with AJAX but I uninstalled it anyways and still doesn't work. Is there anything else - any settings or anything - that I should check that may be causing this problem.

Thanks.


We are having the same issue. Ajax won't work in virtual directories inside of other virtual directories. Have yet to figure out the solution. If anyone has any ideas post them please.

Thanks.


Neither one of you mentioned that you had any errors. However the most common cause of it not working is that the Virtual directory has not been made an Application in IIS. Use IIS to "Create" the application.


Yes, the sub application is set at an application. There are no errors, ajax just doesn't work. It just does full postbacks.

If you take the sub-applcation and remove it from being a "child" app...then it works perfectly. It just doesn't like being nested in another application.


Can application mapping be the cause of this problem. I currently have IIS application maps that cause .html and .xml pages to be run by the .NET framework. Is it possible that this can prevent AJAX from running in any way?


Since I had never tried nested virtual directories, I did a test on localhost using a physical directory created as an application. Inside this I put a virtual directory mapped to its own physical directory (created as an application by default). As another layer, inside this virtual directory, I put a virtual directory mapped to a third physical directory (also created as an application by default). All three function with a variety of Ajax tests including an UpdatePanel. I therefore doubt that common nested virtual directories are the root cause of the problem, unless there is a specific difference in Windows 2003 Server (which I doubt). I'll fire up my server and repeat it if that is suspect.

One thing I had to make sure of with the 2 virtual directories is that the mapped physical directories have to have permission added for the ASPNET user (XP), (or Network Service on server 2003). Otherwise I got a server 500 error after a request for authentication. Since you don't have errors, that is not the problem, but it is another aspect to keep in mind when mapping virtual directories.

However in reviewing the dialog above, there is a bit of confusing information in that two different types of virtual directories are being talked about. A virtual directory that maps to a physical directory on the same server (or even a UNC on another server which involves harder to set up permissions) are the common type. However a virtual directory which maps to a different URL is a re-direction and uses a different sequence of HTTP requests to get to the new directory. Maybe you could clarify how these are mapped if you know (hosting company may hide the implementation)

It is not necessary to have nested virtual directories of the former type for even a complex site. In two large corporations that I have worked at, we didn't have any nesting as there is no need to. You can create as many directory layers as you want before creating the last one as a virtual directory and your web site can have as many virtual directories as you want at the root or lower without any nesting necessary. The level at which an application is created in independent even though it is created by default on a new virtual directory. In a hosted environment it seems to me that the main method for separate domains is different web sites each with it's own applications and physical or virtual directories. So the shared hosting environments must use tricks to point to web sites. The key is getting to the bottom of how this works.

Other than that, if only the UpdatePanel is not working, that seems specific to a DLL loading (or not) and the suggestion that the directory Application is not configured properly is relevant. This should be correctable by deleting the virtual directory and recreating it (being careful to insure permissions for the physical directory are set)

If you want to go further, post the code you used and put it on the suspect web site along with a fresh copy of the template web.config. Send the URL (privately if you want) because I can analyze it with various tools and see what is actually happening when you hit the site.


I think I finally pinpointed this problem. It appears that my site at virtual directory domain1.com/ajaxvirtualdirectory is using the web.config file from the domain1 root directory (although I can't understand why). And when I access it from domain2.com/virtualdirectory it is using the domain2 web.config. Does that make sense?

I know this worked because I temporarily deleted the web.config from domain1 and replaced it with the web.config from domain2. Problem is, I still need the info from the original web.config so what fields do I need to include in the web.config to make AJAX work - or is there anything I can have in there (such as sessionstate=false or anything else). I tried combining the 2 but that didnt work.

Here;s what my web.config looks like

<configuration><!-- application specific settings --><appSettings><add key="ConnectionString" value="server=MYSERVERNAME;database=MYDB;uid=MYUSER;pwd=MYPW;"/><add key="FileDirectory" value="C:\MYFILEDIREC"/></appSettings><!-- forms based authentication --><system.web><compilation debug="true"><compilers><compiler language="vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" extension=".VB" compilerOptions="/define:Debug=True /define:Trace=True /imports:Microsoft.VisualBasic,System"/></compilers></compilation><!-- enable Forms authentication --><authentication mode="Forms"><forms name="MYFORMAUTH" loginUrl="login.aspx" protection="All" path="/"/></authentication><!-- enable custom errors for the application. Change mode to off to see what error is. RemoteOnly to hide errors --><customErrors mode="Off" defaultRedirect="Errors.aspx" /><!-- disable session state for application --><sessionState mode=""/><globalization fileEncoding="utf-8" requestEncoding="utf-8" responseEncoding="utf-8"/><xhtmlConformance mode="Legacy"/><pages><namespaces><add namespace="Microsoft.VisualBasic"/></namespaces></pages></system.web><!-- set secure paths --><location path="PAGE1.aspx"><system.web><authorization><deny users="?"/></authorization></system.web></location><location path="PAGE2.aspx"><system.web><authorization><deny users="?"/></authorization></system.web></location><location path="PAGE3.aspx"><system.web><authorization><deny users="?"/></authorization></system.web></location></configuration>

Asp.Net Ajax Hosting

I am looking to begin using Asp.Net Ajax on my hosted website. I read on this site that I would have to drop the Ajax dll in the bin folder, and change the trust level to full.

I was wondering If there is a KB article on the ins and out of using Asp.Net Ajax in a hosted enviornment.

Thanks

Hi,

first check if your hosting company already supports ASP.NET AJAX. They just need to install it, by getting the .msi fromhttp://ajax.asp.net/downloads/default.aspx?tabid=47. It's fully supported by Microsoft (the Extensions pack, not the futures!).

Grz, Kris.

ASP.NET AJAX Enabled website Problem Stack Overflow

Hi all,

I use ASP.NET AJAX Enabled website. It gives error in IE "Stack Overflow at Line : 0" while i am doing paging in datagrid or any action like button click etc.

Anyone please solve my issue.

Thanks & Regards,

Patel Nasrullah


Make sure you do not have smart navigation turnned on.


Check out this post:http://forums.asp.net/p/956056/1397151.aspx

Specifically the post bywinter: "Had this problem also, did a little search and it turns out that it may be a bug in IE6 as well... (search Microsoft KB for more on this)
However, I resolved this when I changed to SmartNavigation="true" in my config-file instead of MaintainScrollPositionOnPostback.
Also a little tip: make sure that this is not still declared in any your pages' Page-property if SmartNavigation is used in the config-file."

-Damien

ASP.NET AJAX enabled page loses its AJAX behavior when an IFrame is placed inside of an Up

Hello everyone,

I have a strange issue on one of my web pages in our ASP.NET AJAX-enabled Website. We have an ASP.NET 2.0 Website and we wanted to ajaxify it just by making good use of the UpdatePanel control on all the pages of website to remove the postbacks and make the pages more responsive to the user. One of the pages has a couple of IFrames on it and when we tried to place all the content on the page inside of an UpdatePanel, we have noticed that the browser itself crashes upon the selectedIndexChange event of a DropDownList on the same page. The IFrames are hidden by default and are made visible only upon the click event of a button.

When I wanted to find out the reason behind all this by replicating or simulating the same aforementioned behavior on a sample page, I have noiticed this *** behavior that if an IFrame is placed inside of an UpdatePanel along with other html elements, the page loses its AJAX behavior and makes a postback for the click event of a button placed inside of the same UpadetPanel as the IFrame.

Here's the source code for that...

<form id="frmAJAX7" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="TRUE">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<table>
<tr>
<td>
<asp:Label ID="lblName" runat="server">Enter Your Name: </asp:Label>
</td>
<td>
<asp:TextBox ID="txtName" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="2">
<asp:Button ID="btnClick" runat="server" OnClick="btnClick_Click" Text="Click me!" />
</td>
</tr>
<tr>
<td colspan="2">
<asp:Label ID="lbl" runat="server"></asp:Label>
</td>
</tr>
</table>
<iframe id="iframe1" frameborder="1" src="http://pics.10026.com/?src=http://www.msdn.microsoft.com"></iframe>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form
If the IFrame named iframe1 is placed outside of the UpdatePanel, the page works fine and exhibits the normal AJAX behavior. Is there any kind any of conflict between the ASP.NET AJAX extensions and the IFrame element?

Please let me know if any one out there has any idea about this since I am not a seasoned developer yet in ASP.NET AJAX. And any help regarding this would be appreciated as this is quite an urgent requirement.

Thanks in advance...

Well...it seems to be working fine for me.
I belive you are getting confused coz the page inside the IFrame which happens to behttp://www.msdn.microsoft.com in the example above is reloading itself on button click. The purpose of Ajax is (or to be more specific, you can say UpdatePanel in your case) instead of causing entire page to postback it would just refresh the part of the page which is inside update panel. Notice the Label and and text box in which you enter your name they dont get reloaded when they are inside the update panelon button click. Try putting everything out of updatepanel and then check the behaviour of TextBox and Label. I am sure you would notice the difference.

I also tried keeping a drop down list control inside and outside the update panel, still working fine for me.

Well, instead of keping the Src of IFramehttp://www.msdn.microsoft.com try to keep the Src of IFrame some other webpage in your project(preferebly with one or two textbox and buttons) and if you still dont notice the difference then also try to keep the controls of source page under updatepanel:)

Hope this helps:)

Cheers
Ritesh


Thanks for the reply, Ritesh.

I have mentioned the src attribute to a different page, part of the same project. I replaced the value of the src attribute to http://msdn.microsoft.com just for the posting purposes. The source page has UpdatePanel with a few other controls wrapped inside of it. I still get the same issue.

Here's the source code for the source page of the IFrame...

<form id="frmAJAX2" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text="Panel Created"></asp:Label>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Click me!" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form
I don't really want the UpdatPanel to refresh or reload the source page of the IFrame and even if it does, the request should be a asynchronous postback, which is not the one happening in my case. I see a clear postback in the example that I have mentioned.

Hope I was clear enough...


Hey....i thought you were seeing main page getting refreshed. Now...If I understand you correctly then you dont want the SOURCE page inside the IFrame to get refreshed... Well as I said in my last post Ajax would not postback the entire page but the controls inside the update panel would get refreshed to fetch the data from the server.

If you dont want to see any refreshing in the source page then you need to create page which would work something like this onehttp://www.jamesdam.com/ajax_login/login.html. Hit F5 and try to refresh this page and see the difference. Also keep this page under the source of IFrame. You can refer to the sample code provided at the botton of that page.

Cheers
Ritesh

Monday, March 26, 2012

ASP.NET Ajax and VisualStudio2005

Hi there,

I've recently been experimenting with ASP.NET Ajax.
I'm able to create an Ajax Enabled website however Visual Studio doesn't seem to recognize the Asp.NET Ajax components...

When I'm viewing the web page in HTML format it doesn't even recognize the <asp:ScriptManager>.
What's really getting to me is that it doesn't recognize the<asp:UpdatePanel> nor the <contenttemplate>...andeverything within these tags, even though they are regular components(like text boxes and panels), shows up as errors.

Finding real problems in the HTML is difficult because there are so many error-swigglies underlining everything.


The site is works very well...and despite the fact that all theseerrors are listed, Visual Studio still compiles and runs the site.


Is there a way to make Visual Studio recognize the ASP.NET Ajax components?

Thanks

-Frinny

Have you added the Ajax/ControlToolkit components to the VS toolbar?

Yes, I have added it to the toolbar.

The site uses a bunch of different extenders and makes use of the update panels.
It works nicely but Visual Studio is showing the errors even though there are no errors.


That's odd.

When I enable Ajax, or ControlTookit, on existing asp.net pages the toolbar changes and the directives in the web.config seem to always do the trick.


So you don't see red-squggly error indicators when viewing the aspx as html?

Am I missing something? Did I not set this up correctly?


Have you registered the assembly in your aspx page?

<%

@.RegisterAssembly="AjaxControlToolkit"Namespace="AjaxControlToolkit"TagPrefix="ajaxToolkit" %>


Yes I have <%@.RegisterAssembly="AjaxControlToolkit"Namespace="AjaxControlToolkit"TagPrefix="ajaxToolkit" %> at the top of my pages.

This problem has been solved.

I was running Visual Studio 2005 without Service Pack 1.
Once I installed SP1 everything worked as it should...no more errors are showing up.

Thanks for all your help and advice!


-Frinny


Thanks for reporting back...You'll no doubt help a lot of others.Wink

asp.net ajax and size websit

hi

i have website with updatepanal the size its big how can i reduce the size of website

that because (asp.net ajax updatepanal)

What do you have in the UpdatePanel that is making it big? Remember that if you are transferring large amount of data you may be better of by using the postback solution.
thank u for replay my problem in the size javascript for asp.net ajax not i because the size id 266kb

ASP.Net AJAX 1.0 deployment

Dear All,

I am using ASP.Net 2.0. For using AJAX, i installed ASP.Net AJAX 1.0 extensions in my local pc and developed a website using it.

Now, i need to deploy in the third party web server. Is my AJAX work in the third party web server ? or other wise i need the web server which supports ASP.Net AJAX 1.0 extensions.

Thanks in advance.Idea

Publish it! ... if you have problem install the AJAX Extensions in your web server.


Thanks for your quick response.

This is my Doubt. I am using the ASP.Net AJAX 1.0 components in my website (Local). when i need to host it in common third party server, how those components will work without having ASP.Net AJAX 1.0 extensions support in the third party server. I think this will clarify my actual doubt.


Hi,

As far as I know, ASP.NET is only supported by IIS currently.

So, if the third party web server means a web server other than IIS, it can't work properly. For further confirmation, you may contact the vender of the web server.

If the third party web server means a different machine but has IIS installed, then it's necessary to install AJAX extension on it.


Dear Sir, I mentioned Third party hosting provider as Third party web server
Thanks for your reply I understood the problem in it.

Saturday, March 24, 2012

asp.net 2.0 ajax website menucontrol : javascript error :"Microsoft JScript runtime error:

i m developing application using ajax in asp.net 2.0 . I m using menu control of asp.net,multiview and view control.while running this application i got error "Microsoft JScript runtime error: '0.cells' is null or not an object" so now what is the solution of this i have returend following coad in html

<

div>

<

asp:UpdatePanelID="UpdatePanel2"UpdateMode="Conditional"runat="Server"><ContentTemplate>

<tablecellpadding="0"cellspacing="0"border="0"width="100%"><tr><tdwidth="6%"><asp:MenuID="Menu1"runat="server"DynamicHoverStyle-BackColor="Aqua"DynamicHoverStyle-Font-Overline="true"DynamicHoverStyle-ForeColor="Brown"DynamicMenuItemStyle-BackColor="Crimson"dOrientation="Horizontal"StaticEnableDefaultPopOutImage="False"OnMenuItemClick="menu_click"Orientation="Horizontal"><Items><asp:MenuItemText="Operator"Value="0"></asp:MenuItem><asp:MenuItemText="Visitor"Value="1"></asp:MenuItem></Items><StaticMenuStyleBackColor="White"/><StaticMenuItemStyleBackColor="White"/><StaticSelectedStyleBackColor="#FFC080"/><StaticHoverStyleBackColor="#80FFFF"/></asp:Menu><asp:MultiViewID="MultiView1"runat="server"><asp:ViewID="op"runat="server"><tablewidth="30%"><trvalign="top"><td>hetal</td></tr></table></asp:View><asp:ViewID="visitor"runat="server"><tablewidth="30%"><trvalign="top"><td>tarun</td></tr></table></asp:View></asp:MultiView></td>

</tr>

</table>

</ContentTemplate>

</

asp:UpdatePanel>

</

div>

please give me solution for this error...thank u

<asp:menu > control seems to be not compatible withUpdatepanel. Put the menu control outside the updatepanel. If you wantto refresh only updatepanel contents on click of menu control, then setmenu control as an async postback trigger for updae panel as givenbelow.

try following modified code.

<div>
<asp:Menu ID="Menu1"runat="server" DynamicHoverStyle-BackColor="Aqua"DynamicHoverStyle-Font-Overline="true"DynamicHoverStyle-ForeColor="Brown"DynamicMenuItemStyle-BackColor="Crimson" dOrientation="Horizontal"StaticEnableDefaultPopOutImage="False" OnMenuItemClick="menu_click"Orientation="Horizontal">
<Items>
<asp:MenuItem Text="Operator" Value="0" ></asp:MenuItem>
<asp:MenuItem Text="Visitor" Value="1"></asp:MenuItem>
</Items>
<StaticMenuStyle BackColor="White" />
<StaticMenuItemStyle BackColor="White" />
<StaticSelectedStyle BackColor="#FFC080" />
<StaticHoverStyle BackColor="#80FFFF" />
</asp:Menu>
<asp:UpdatePanel ID="UpdatePanel2" UpdateMode="Conditional" runat="Server">
<ContentTemplate>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td width="6%">
<asp:MultiView ID="MultiView1" runat="server" >
<asp:View ID="op" runat="server">
<table width="30%">
<tr valign="top"><td>hetal</td></tr>
</table>
</asp:View>
<asp:View ID="visitor" runat="server">
<table width="30%">
<tr valign="top"><td>tarun</td></tr>
</table>
</asp:View>
</asp:MultiView>
</td>
</tr>
</table>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Menu1"EventName="MenuItemClick" />
</Triggers>
</asp:UpdatePanel>

</div>


You can also add the below script to your aspx page. It overrides the AJAX function and takes care of the error. This works for problems with Tab Controls too, seehttp://forums.asp.net/thread/1628780.aspx.

<scripttype="text/javascript">

var oldMenu_HideItems = Menu_HideItems;if(oldMenu_HideItems)

{

Menu_HideItems =

function(items)

{

if (!items || ((typeof(items.tagName) =="undefined") && (itemsinstanceof Event)))

{

items = __rootMenuItem;

}

if(items && items.rows && items.rows.length == 0)

{

items.insertRow(0);

}

return oldMenu_HideItems(items);

}

}

</script>

asp.net 1.1 , how to do use tab control in asp.net 1.1

AJAX provides following functionality to website, and I want to make something like this in my application. I m using asp.net 1.1 How can I do this.

Please click following link and see demo how AJAX does ( you will get it what I mean by, thank you)

http://www.asp.net/AJAX/AjaxControlToolkit/Samples/Tabs/Tabs.aspx

I want to make something like above like deom , how can I do that using asp.net 1.1

thank you in advance

maxmax

It is possible but there is not a simple solution. The more simple solution would be to convert your site to the 2.0 framework. If that is not possible, then just google "ajax with .net 1.1" there are lots of articles out there.

ASP.NET / AJAX for beginnners

Hi new friends,

My name is Eduardo. The ASP.NET / AJAX are my new and recent tool to develope programs and website. There are too many doubts about ASP.NET and AJAX. Please, somebody help me?

I have been a lot of pain in my head with AJAX. I'm learning and studying every day, but I have some doubts yet:

1) Do you have some articles that show the good practice to apply AJAX in your ASP.NET application?

2) How many scripts source and update panel I can have in my application or by page?

3) Is the good thing to put one script source and updatepanel in masterpgage?

4) I create an applicaction that have a scriptsource and updatepanel in masterpage. So, There is one label into updatepanel that show the date and timer automaticly without refresh in browser. When I have to create a webpage (aspx) and apply this masterpage I can't use another instance of updatepanel or scriptsource? What's wrong?

Thanks a lot,

Eduardo

This will help you

http://ajax.asp.net/ajaxtoolkit/

http://localhost/AspNet_AJAX_Documentation/


Hi Eduardo,

1 - Articles, like videos and tutorials you can find in AJAX homepagehttp://ajax.asp.net

2 - To you have best performance use updatepanels in conditional mode and add the controls that make ajax-postback as Triggers ... You can do this in updatepanel properties... I like to use one scriptmanager in masterpage and use updatepanel with controls that have relations ...

3 - Only scriptmanger in masterpage ... the updatepanels um can "use on-demmand" in your pages.

4 - Modify your masterpage ... remove your contentplaceholder from the updatepanel ... try to use only your label in your updatepanel that is in masterpage...


This might help you

http://ajax.asp.net/ajaxtoolkit/

http://ajax.asp.net/documentation/default.aspx?tabid=47


Antonio,

Já que você é brasileiro, podemos falar em PT!!! N?o entendi o que vc explicou nos itens abaixo:

//////
2 - To you have best performance use updatepanels in conditional mode and add the controls that make ajax-postback as Triggers ... You can do this in updatepanel properties... I like to use one scriptmanager in masterpage and use updatepanel with controls that have relations ...

3 - Only scriptmanger in masterpage ... the updatepanels um can "use on-demmand" in your pages.

4 - Modify your masterpage ... remove your contentplaceholder from the updatepanel ... try to use only your label in your updatepanel that is in masterpage

////

Desculpe meu incomodo, mas é que nao tenho muita experiencia no .NET/AJAX, portanto você poderia explicar novamente?

Grato,

Eduardo


Para ter bom desempenho com seu updatepanel, use em modo condicional, vc altera o modo na propriedade do updatepanel. Também nas propriedades do updatepanel adicione as triggers... que s?o os controles que ir?o atualizar o updatepanel. Entendeu?

Eu costumo usar o scriptmanager na masterpage e coloco diversos updatepanels em minha páginas ... De acordo com a necesecidade ...

Wednesday, March 21, 2012

ASP .NET Ajax, Windows Authentication and 401.1

Hi all!

I have a website on IIS with Windows Authentication only. Website uses UpdatePanel.

Scenario:

- some user is authenticated on site and browses it

- at some moment his password in Active Directory is changed

- after that user clicks somewhere on site (UpdatePanel tries to update its content)

- user sees Windows Authentication form, enters his login and incorrect password and then press OK three times

- he receives dialog with error message "Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occured while processing the request on the server. The status code returned from the server was: 401".

How to handle this error on the client? How can I redirect user to error page?

For now I found some simple solution. I just suppress error and refresh page.

<asp:ScriptManager

ID="ScriptManager1"

runat="server">

</asp:ScriptManager>

<scripttype="text/javascript"language="javascript">

Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);

function EndRequestHandler(sender, args)

{

if (args.get_error() != undefined)

{

args.set_errorHandled(true);location.reload(true);

}

}

</script>


Thanks a lot.

It is also a solution for all PageRequestManagerServerErrorException- Problems.

(12031, 12030, ...)