This is my web.config file...
<?xml version="1.0" encoding="UTF-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<authentication mode="Forms">
</authentication>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
<directoryBrowse enabled="true" />
</system.webServer>
</configuration>
When i trying to host my application getting error..
It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
Thanks
check that app pool is set up with asp.net 4.0
make sure the website (or virtual directory) in IIS is an application, and not just a folder; right-click will give you related options
Related
I want to change error page for all my websites on IIS.
How can I modify original .net framework error page for all of them at once?
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
I published a website yesterday, and I don't have any authentication form on my website.
This is my web.Config :
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
</system.web>
<system.webServer>
<defaultDocument>
<files>
<add value="Default.aspx"/>
</files>
</defaultDocument>
</system.webServer>
</configuration>
But when I try to browse my website, it gives me 403 error! I don't have any authentication form on my website, why it's happened?
403 is for access denied/forbidden, can you check your IIS which you have hosted. Looks like some IIS settings like Application Pool, Framework settings.
Looks like Application which its targeting to the framework needs to be explicitly selected.
Hi can you please help me. I am struggling to get my aspx page to load on my local pc iis6 , windows 8.
if I go to localhost then i see the default iis page view to proove that iis works.
I tried to set up a site called "test" that points to my web site folder and it will not . see images bellow. can you please help?
C:\Users\xxxx\Documents\\WebSite1
web.config
<?xml version="1.0" encoding="UTF-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
</system.web>
<system.webServer>
<defaultDocument>
<files>
<add value="Default.aspx" />
</files>
</defaultDocument>
</system.webServer>
</configuration>
I am modifying a website using asp.net pages which was created using asp. In the web.config file I am using
<system.web>
<compilation debug="true" strict="false" explicit="true" tarrgetFramework="4.0"/>
<httpRuntime requestValidationMode="2.0" maxRequestLength="1048576" executionTimeout="3600" />
<customErrors mode="Off"/>
</system.web>
and also tried
<customErrors mode="RemoteOnly" defaultRedirect="error.htm"/>
But still an error occuring as
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 tag within a "web.config" configuration file located in the root directory of the current web application. This 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 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>
What is its solution??
I have 2 login pages: Login.aspx-for customer login and xlogin.aspx for admin login
i just uploaded my project to the server and all application pages works great
but when i log in the admin xlogin.aspx i'm being forwarded to the admin.aspx page - but i get this error:
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>
This is my web.config
<?xml version="1.0"?>
<configuration>
<connectionStrings>
<clear/>
<add name="PROJEntities" connectionString="metadata=res://*/PROJModel.csdl|res://*/PROJModel.ssdl|res://*/PROJModel.msl;provider=System.Data.SqlClient;provider connection string="Data Source=000.000.0.00;Initial Catalog=DBNAME;User ID=MYUSERNAME;Password=MYPASS;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient"/>
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<authentication mode="Forms">
<forms loginUrl="~/Login.aspx" timeout="720" slidingExpiration="true" defaultUrl="~/Gateway.ashx"/>
</authentication>
<customErrors mode="Off"/>
<pages enableEventValidation="false" viewStateEncryptionMode="Never"></pages>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization>
<converters>
<add type="PROJ.Presentation.Common.DateTimeConverter" name="DateTimeJavaScriptConverter"/>
</converters>
</jsonSerialization>
</webServices>
</scripting>
</system.web.extensions>
</configuration>
Dear olga is clear what the message says. Turn off the custom errors to see the details about this error for fix it, and then you close them back. So add mode="off" as:
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Relative answer:
Deploying website: 500 - Internal server error
By the way: The error message declare that the web.config is not the one you type it here. Maybe you have forget to upload your web.config ? And remember to close the debug flag on the web.config that you use for online pages.
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 tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off".
This can be the message you receive even when custom errors is turned off in web.config file. It can mean you have run out of free space on the drive that hosts the application. Clean your log files if you have no other space to gain on the drive.
In my case I got this message because there's a special char (&) in my connectionstring, remove it then everything's good.
Cheers