c# - Getting web.config file error and 500 error in godaddy after uploading my web files to the server -
<configuration> <system.net> <mailsettings> <smtp deliverymethod="network" from="gdkpavan@gmail.com"> <network defaultcredentials="true" host="smtp.gmail.com" password="nprao@1111" port="587" username="pranayn5@gmail.com"> </network></smtp> </mailsettings> </system.net> <appsettings> <add key="con" value="data source=moviemaster.db.10502677.hostedresource.com; initial catalog=picketmaster; user id=picketmaster; password=picket@500;"> </add></appsettings> <connectionstrings> <system.webserver> <httperrors errormode="detailed"> <asp scripterrorsenttobrowser="true"> </asp></httperrors></system.webserver> <system.web> <compilation debug="true" targetframework="4.0"> <assemblies> <add assembly="system.web.extensions.design, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35"> <add assembly="system.design, version=4.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a"> <add assembly="system.windows.forms, version=4.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089"> </add></add></add></assemblies> </compilation> <authentication mode="windows"> <customerrors mode="off"> <compilation debug="true"> </compilation></customerrors> <pages clientidmode="autoid" controlrenderingcompatibilityversion="4.0"> </pages></authentication></system.web> <system.web> <sessionstate mode="inproc" timeout="15"> </sessionstate></system.web> </connectionstrings></configuration>
when tried connect database string local scheme error lies in connection string.
i tried alter custom errors content off , added detail error still error persists. , beginner in asp.net i've developed website , i've uploaded testing purpose, want see error detail changes need done web page.
after publishing website can't see app code in folder reason reason errors
please check link http://www.ticket65.com/test
thanks in advance
you have connection string within appsettings section of configuration file, should within connectionstrings section.
beyond that, web.config file has number of other issue keys in wrong locations, mismatched end elements, malformed xml etc. 2 of import things remember when working web.config file file must formed, valid xml , element , attribute names cases sensitive. in other words <mailsettings>
valid element name <mailsettings>
not.
i suggest refer system.web element (asp.net settings schema), how to: read connection strings web.config file , system.webserver section grouping [iis settings schema]
i've corrected errors find in in sample below. create assumptions (such beingness on iis7 , using app pool running .net 4.0 framework.)
<?xml version="1.0" encoding="utf-8" ?> <configuration> <system.net> <mailsettings> <smtp deliverymethod="network" from="gdkpavan@gmail.com"> <network defaultcredentials="true" host="smtp.gmail.com" password="nprao@1111" port="587" username="pranayn5@gmail.com" /> </smtp> </mailsettings> </system.net> <connectionstrings> <add name="con" connectionstring="data source=moviemaster.db.10502677.hostedresource.com; initial catalog=picketmaster; user id=picketmaster; password=picket@500;" /> </connectionstrings> <system.webserver> <httperrors errormode="detailed" /> <asp scripterrorsenttobrowser="true" /> </system.webserver> <system.web> <compilation debug="true"> <assemblies> <add assembly="system.web.extensions.design, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" /> <add assembly="system.design, version=4.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a" /> <add assembly="system.windows.forms, version=4.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" /> </assemblies> </compilation> <authentication mode="windows" /> <customerrors mode="off" /> <pages clientidmode="autoid" controlrenderingcompatibilityversion="4.0"/> <sessionstate mode="inproc" timeout="15" /> </system.web> </configuration>
c# asp.net .net web-config
No comments:
Post a Comment