Forum Moderators: open

Message Too Old, No Replies

Need help with a simple asp.net application

Getting server runtime error when trying to view it

         

WilMoya

2:08 pm on Jan 30, 2007 (gmt 0)

10+ Year Member



I created an application that inserts text into a sql database. I created the form on a plain xhtml page (nothing else on the page but the form and the asp.net code). The connection to the database is fine, as well as the table accessibilty. When I try to view it on IE7 or Firefox I get a error page with this on it. Any suggestions will really help.

Server Error in '/' Application.
--------------------------------------------------------------------------------

Runtime Error
Description: 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.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>

marcel

5:01 pm on Jan 30, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you tried following the instructions? (editing the web.config file)

After that you should receive an error message detailing exactly what the problem is.

WilMoya

6:21 pm on Jan 30, 2007 (gmt 0)

10+ Year Member



I edited the config file and it didn't give me an error. This is what I did to the config file:

<configuration>
<appSettings>
<add key="MM_CONNECTION_HANDLER_Survey1" value="sqlserver.htm" />
<add key="MM_CONNECTION_STRING_Survey1" value="Persist Security Info=False;Data Source=it-sqltest;Initial Catalog=Survey1;User ID=userid;Password=password" />
<add key="MM_CONNECTION_DATABASETYPE_Survey1" value="SQLServer" />
<add key="MM_CONNECTION_SCHEMA_Survey1" value="" />
<add key="MM_CONNECTION_CATALOG_Survey1" value="" />
<system.web>
<customErrors mode="Off"/>
</system.web>
</appSettings>
</configuration>

[edited by: WilMoya at 6:24 pm (utc) on Jan. 30, 2007]

TheNige

8:09 pm on Jan 30, 2007 (gmt 0)

10+ Year Member



Try running the web site from [localhost...]

You will be able to see the error then. Better yet, why not try debuggin in your IDE first.

WilMoya

5:02 pm on Feb 8, 2007 (gmt 0)

10+ Year Member



This is the error that the site returned on localhost:

Line 1: <%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1" %>
Line 2: <%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=837z106ede0777kl8,culture=neutral" %><MM:Insert
Line 3: runat="server"
Line 4: CommandText='<%# "INSERT INTO dbo.New_tbl_main (Q1, Q2, Q3, Q4, Q5, Q6, Q7, Q8, Q9, Q10, Q11, Q12, Q13, Q14, Q15, Q16, Q17, Q18, Q19, Q20, Q21) VALUES (@Q1, @Q2, @Q3, @Q4, @Q5, @Q6, @Q7, @Q8, @Q9, @Q10, @Q11, @Q12, @Q13, @Q14, @Q15, @Q16, @Q17, @Q18, @Q19, @Q20, @Q21)" %>'

Any tips?

Thanks,
Wil

centime

5:50 pm on Feb 8, 2007 (gmt 0)

10+ Year Member



it appears to be suggesting that the dreamweaver control you've placed has faulty snytax

I don't use dream weaver at all, but you want to compare your code to sample dreamweaver code that actually works,