.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

CustomError Mod Logs redirects me to Logout

Posted By:      Posted Date: September 08, 2010    Points: 0   Category :ASP.Net
I have a bug in which, whenever an error occurs the user seems to get logged out.  After much research I find that the situation is not so simple:(note I have dumbed these down a bit to make it easier to follow)Web.config - I turn on Custom Error Mode               <customErrors mode="On" defaultRedirect="ExceptionPage.aspx" >       <error statusCode="404" redirect="PageNotFound.aspx"/>     </customErrors >              <customErrors mode="On" defaultRedirect="ExceptionPage.aspx" >      <error statusCode="404" redirect="PageNotFound.aspx"/>    </customErrors >Global.asax - I save the Last Error so I can access it easily later on the error page    void Application_Error(object sender, EventArgs e)    {        Exception oEx;                oEx = HttpContext.Current.Server.GetLastError();                HttpContext.Current.Session["LastException"] = oEx;}ExceptionPage.aspx - Show a nice error message protected void Page_Load(object sender, EventArg

View Complete Post

More Related Resource Links

Migrating ASP to ASPX.... where to set 301 redirects


Hello, I'm updating around 15 pages from .asp to .aspx (.net 2.0)

My question is, do I have to put a header redirect 301 (permanent redirect) on each old file, or can I put it in global.asax file with a case checking for any of the 15 files?

I some tries to go to old.asp will it execute global.asax anyway?

What would the best aproach be?



Toolbox: Database Audit Logs, Joel on Software, Code Handouts, and More


This month the Toolbox column takes a look at database logging, Joel Spolsky's blog, printing code projects, and ASP.NET reading.

Scott Mitchell

MSDN Magazine May 2008

Toolbox: Generate Office Documents, Monitor Event Logs, and More


Most data-driven Web sites are used as interfaces to collect, process, and summarize information. Reports that summarize the data can be presented to the user in a variety of formats-the most common way is to display the report directly in a Web page.

Scott Mitchell

MSDN Magazine June 2006

Office: Relive the Moment by Searching Your IM Logs with Custom Research Services


Often, IM conversations contain important information you'd like to keep and reuse. Fortunately, MSN Messenger 6.2 has a feature to keep a conversation history permanently in XML format. This article shows you how to leverage that conversation history by consolidating IM exchanges so they are indexed, searchable, and ultimately reusable using the Microsoft Office 2003 Research and Reference task pane.

John R. Durant

MSDN Magazine February 2005

"Content for this URL is excluded by the server because a no-index attribute." in crawl logs


Hi All,

I am getting following error message in Crawl Logs

" Content for this URL is excluded by the server because a no-index attribute. "

Any help in this regard will be greatly appreciated.



'There is no Web named' in logs


I was wondering if anybody could help me.  When i look at logs in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\LOGS i get a lot of errors saying 'There is no Web named'.

For example:-
09/08/2008 09:29:37.17  w3wp.exe (0x1BA0)                        0x296C Windows SharePoint Services    General                        8kh7 High     There is no Web named "/quality/Audit Reports/Forms/AllItems.aspx". 

There are no errors in server application event log.  I was hoping to find out what this means and if i should worry about the errors. 


Chris Rees.

Logout not redirecting correctly


I have the following control on my master page


asp:LoginStatus ID="LoginStatus1" runat

Sharing folders under 12\logs


Hi Admins, 

I have a general question.  developer team does not have direct access to server. But they frequently need to dig logs for errors. (yes we have a test server but when switched to prod. environment, programs sometimes give errors that are need to be digged in prod)

Is it ok to "share" the folder program files\common files\microsoft shared\web server extensions\12\logs folder, so they can map the Web front End's logs folder to their computers ?

I dont really think it sounds good to make a sharing on production server like this,it is a sort of customization, I need your advices. is there a significant disadvantage that causes "don't!!" for this kind of operation?


Thanks in advance..


Re-run WSS 3.0 Usage Analysis Logs


WSS3.0SP2, 64-bit.

The service which runs and collects the log files for the Usage Analysis report was disabled for some reason. We have it re-activated but the logs for when it was down were not processed. How do we re-process those older logs?

Previously asked at  http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?&lang=&cr=&guid=&sloc=en-us&dg=microsoft.public.sharepoint.windowsservices&p=1&tid=f676c989-a369-4761-94e7-ef9b1c28fde7 and referred to here.

Close Tab doesn't logout


When closing my tab, Formsauthentication doesn't clear, thanks!

protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)

      if (Classes.CStaticDataAccess.AuthenticateUser(Login1.UserName, Login1.Password))
        FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1, Login1.UserName, DateTime.Now, DateTime.Now.AddMinutes(1), false, "");
        string secureTicket = FormsAuthentication.Encrypt(ticket);
        HttpCookie authCookie = new HttpCookie(FormsAuthentication.FormsCookieName, secureTicket);
        string redirectUrl = FormsAuthentication.GetRedirectUrl(Login1.UserName, false);

       // System.Web.Security.FormsAuthentication.SetAuthCookie(Login1.UserName, false);
        e.Authenticated = true;

        e.Authenticated = false;

 <authentication mode="Forms">
      <forms name=".ASPXFORMSAUTH" loginUrl="~/Ware2Login.aspx" protection="All" timeout="30" path="/" ></forms>
      <deny users="?"/>

SQL Server Logs too big under Management

Hi, The sqlserver logs ("Current - date","Archive-date"...) is too big to open easily (esp at the time of crisis). Any idea how can I restrict the size of these logs to manageable size so that they can be read immediately? Is there any way to Archive daily logs separately? Thanks Chander

error when logout my web page

sir i am usinng ajax roundcorners toolkit but when i logout my web page error occuers . error is:- Microsoft JScript runtime error: Sys.ArgumentTypeException: Object of type 'AjaxControlToolkit.RoundedCornersBehavior' cannot be converted to type 'AjaxControlToolkit.RoundedCornersBehavior'. Parameter name: instance

Sharepoint and IIS/Windows Event Logs in a single view

Hi - I'm coinsidering addng sharepoint log reading capabilities into an application I've built for reading windows and IIS logs (for more info http://logenvy.com). I know there are quite a few applications capable of reading sharepoint logs (a number are listed here http://stackoverflow.com/questions/781179/sharepoint-2007-log-viewer). Does anyone think the capability to analyse windows and IIS logs alongside sharepoint logs would be useful, or have any logging requirements not well met by the current set of tools? I'm especially keen to explore useful/interesting data visualizations on top of data logs.

PageViewerWebPart content url redirects to a full page

I have a many pages that contain the mentiond webpart, and it works swimmingly.  However there are a few links that re-direct and open a full page in the browser, and not in the webpart :( I am fairly sure that there is no way to stop this with out access to the javascript or url (which i may have access to eventually). I am curious if anyone else has experinced this small snafu and what, if any, was your work around. Regards, max   ps i coded and added this in C#, hence the post in the programming sub-forum.

Logs are written only on one WFE

Hi,h I have a four server farm. 1 db server and 3 wfe's. They are not load balanced. the log level is  "verbose".. however, only one wfe is writing logs. I mean, on the first WFE there are 3 log files under 12\logs and there are about 100 gb each. The other WFEs have three logs but they are 10kb  !!! Is this normal?? Why is that happening

Effect of error logs

Hi, I just came across a situtation where one of my application is trying to connect SQL box and is failing because of permission. It is writing audit failure to the Error log file. Can anyone please explain what would be the effect of this continous writing to error log. Does it affect performance of SQL Server in any ways or if there is a way i can check.Regards, Deven ----------------------------------------- Please vote if you find any of my post helpful.

logout coding

i hv a default.aspx page that ask for username and password. i maintain a session["uname"]  on the clikc of submit button.now on submit click i am redrtng to new page default1.aspx that have a logout link button. wat coding should i do on the click of logout so that i m not rediretct back to default1.aspx on pressing back buton of browser.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend