Web Config <customErrors mode="Off"/>http://forums.asp.net/t/1267844.aspx/1?Web+Config+customErrors+mode+Off+Thu, 24 Sep 2009 10:30:22 -040012678442387503http://forums.asp.net/p/1267844/2387503.aspx/1?Web+Config+customErrors+mode+Off+Web Config <customErrors mode="Off"/> <p>Hi to all,</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I have web application project it's workgin fine in local machine, but when i upload it to the server then i mee the below error</p> <p><span></p> <h2><i>Runtime Error</i> </h2> </span><font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "><b>Description: </b>An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. <br> <br> <b>Details:</b> To enable the details of this specific error message to be viewable on remote machines, please create a &lt;customErrors&gt; tag within a &quot;web.config&quot; configuration file located in the root directory of the current web application. This &lt;customErrors&gt; tag should then have its &quot;mode&quot; attribute set to &quot;Off&quot;.<br> <br> <table bgcolor="#ffffcc" width="100%"> <tbody> <tr> <td> <pre>&lt;!-- Web.Config Configuration File --&gt;<br><br>&lt;configuration&gt;<br> &lt;system.web&gt;<br> &lt;customErrors mode=&quot;Off&quot;/&gt;<br> &lt;/system.web&gt;<br>&lt;/configuration&gt;</pre> </td> </tr> </tbody> </table> <br> <b>Notes:</b> The current error page you are seeing can be replaced by a custom error page by modifying the &quot;defaultRedirect&quot; attribute of the application's &lt;customErrors&gt; configuration tag to point to a custom error page URL.<br> <br> <table bgcolor="#ffffcc" width="100%"> <tbody> <tr> <td> <pre>&lt;!-- Web.Config Configuration File --&gt;<br><br>&lt;configuration&gt;<br> &lt;system.web&gt;<br> &lt;customErrors mode=&quot;RemoteOnly&quot; defaultRedirect=&quot;mycustompage.htm&quot;/&gt;<br> &lt;/system.web&gt;<br>&lt;/configuration&gt;</pre> </td> </tr> </tbody> </table> </font><br> &nbsp;I know this means to change the custom error mode as off, i also do the same code in my web.config but also return the same error, some time i change the mode into ON / Remoteonly but also return the same error, may i know this error from server or due to my code?, how to solve it ? memebrs help me<br> <p></p> 2008-05-29T08:06:15-04:002387522http://forums.asp.net/p/1267844/2387522.aspx/1?Re+Web+Config+customErrors+mode+Off+Re: Web Config <customErrors mode="Off"/> <p>It wont show error. until you have set correct .net framework in server</p> 2008-05-29T08:20:55-04:002387664http://forums.asp.net/p/1267844/2387664.aspx/1?Re+Web+Config+customErrors+mode+Off+Re: Web Config <customErrors mode="Off"/> <p>Thanks for your reply,</p> <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I set like this</p> <p>&lt;system.web&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;customErrors mode=&quot;Off&quot;&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/customErrors&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;!-- <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set compilation debug=&quot;true&quot; to insert debugging <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; symbols into the compiled page. Because this <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; affects performance, set this value to true only <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; during development.<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;compilation debug=&quot;true&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;!--<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The &lt;authentication&gt; section enables configuration <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; of the security authentication mode used by <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ASP.NET to identify an incoming user. <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;authentication mode=&quot;Windows&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;!--<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The &lt;customErrors&gt; section enables configuration <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; of what to do if/when an unhandled error occurs <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; during the execution of a request. Specifically, <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; it enables developers to configure html error pages <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to be displayed in place of a error stack trace.<br> <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;customErrors mode=&quot;RemoteOnly&quot; defaultRedirect=&quot;GenericErrorPage.htm&quot;&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;error statusCode=&quot;403&quot; redirect=&quot;NoAccess.htm&quot; /&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;error statusCode=&quot;404&quot; redirect=&quot;FileNotFound.htm&quot; /&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/customErrors&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --&gt;<br> &nbsp;&nbsp;&nbsp; &lt;/system.web&gt;</p> <p>then also return a same error.....any solution is there?<br> &nbsp; </p> 2008-05-29T09:30:38-04:002389632http://forums.asp.net/p/1267844/2389632.aspx/1?Re+Web+Config+customErrors+mode+Off+Re: Web Config <customErrors mode="Off"/> <p><b>I found the problem,</b></p> <p><b>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; This is the problem due to wrong connection string, i correct it and now it's working fine.<br> &nbsp;</b></p> 2008-05-30T04:15:43-04:002673397http://forums.asp.net/p/1267844/2673397.aspx/1?Re+Web+Config+customErrors+mode+Off+Re: Web Config <customErrors mode="Off"/> <p>I'm facing the same problem. U said its due to having the wrong connect string. What the connection string you used.</p> <p>my script is this. please help me. I don't have any web.config file. it would be very helpful if you give the solution. <br> </p> <p>&lt;script runat=&quot;server&quot;&gt;<br> sub OnBtnSendClicked (s As Object, e As EventArgs)<br> &nbsp;&nbsp;&nbsp; Dim strConn as string = &quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=&quot; &amp; server.mappath(&quot;guestbook.mdb&quot;) &amp; &quot;;&quot;<br> &nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp; Dim MySQL as string = &quot;INSERT INTO Guestbook (Name, EMail, URL, Comment) VALUES ('&quot; &amp; txtName.Text &amp; &quot;','&quot; &amp; txtEMail.Text &amp; &quot;','&quot; &amp; txtURL.Text &amp; &quot;','&quot; &amp; txtComment.Text &amp; &quot;')&quot;<br> &nbsp;&nbsp;&nbsp; Dim MyConn as New OleDBConnection (strConn)<br> &nbsp;&nbsp;&nbsp; Dim cmd as New OleDBCommand (MySQL, MyConn)<br> &nbsp;&nbsp;&nbsp; MyConn.Open ()<br> &nbsp;&nbsp;&nbsp; cmd.ExecuteNonQuery ()<br> &nbsp;&nbsp;&nbsp; MyConn.Close ()<br> &nbsp;&nbsp;&nbsp; <br> &nbsp;&nbsp;&nbsp; Response.Redirect (&quot;guestlog.aspx&quot;)<br> end sub<br> <br> sub OnBtnClearClicked (s As Object, e As EventArgs)<br> &nbsp;&nbsp;&nbsp; txtName.Text = &quot;&quot;<br> &nbsp;&nbsp;&nbsp; txtEMail.Text = &quot;yourname@somebody.com&quot;<br> &nbsp;&nbsp;&nbsp; txtURL.Text = &quot;http://&quot;<br> &nbsp;&nbsp;&nbsp; txtComment.Text = &quot;&quot;<br> end sub<br> &lt;/script&gt; <br> </p> 2008-10-09T16:50:50-04:003005855http://forums.asp.net/p/1267844/3005855.aspx/1?Re+Web+Config+customErrors+mode+Off+Re: Web Config <customErrors mode="Off"/> <p>Create a web.config file then... &gt;_&gt;</p> 2009-03-13T21:49:01-04:003422852http://forums.asp.net/p/1267844/3422852.aspx/1?Re+Web+Config+customErrors+mode+Off+Re: Web Config <customErrors mode="Off"/> <p>Hi all,</p> <p>I am having the same error but only when I try to acces to a specific folder of the web. I have checked my connection string out ant it is ok because it goes fine for the rest of web application...</p> <p>What could it be??</p> <p>Thank you<br> </p> 2009-09-24T10:30:22-04:00