IIS host & .NET version problems

IIS host & .NET version problems

HashFlare

1.iis 403 forbidden – HTTP Error 403.14 – Forbidden The Web server is configured to not list the contents of this directory

run mvc on iis 7.5, need install mvc first, then run cmd:

32bit (x86) Windows

%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -ir

64bit (x64) Windows

%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir

if still not resolved, try
open IIS -> Application Pools -> .NET Framework version -> Advanced Settings -> Enable 32-Bit Application

2.Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the \\ section in the application configuration.

http://forums.asp.net/t/1891041.aspx?Session+state+can+only+be+used+when+enableSessionState+is+set+to+true
2.Server Error in ‘/’ Application.

A potentially dangerous Request.Form value was detected from the client (webcountcode=”<script src=”http://…”>// <![CDATA[

Description: ASP.NET has detected data in the request that is potentially dangerous because it might include HTML markup or script. The data might represent an attempt to compromise the security of your application, such as a cross-site scripting attack. If this type of input is appropriate in your application, you can include code in a web page to explicitly allow it. For more information, see http://go.microsoft.com/fwlink/?LinkID=212874.

Exception Details: System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (webcountcode=”<script src=”http://…”).

solve: requestValidationMode=”2.0″

3.500 error

a.check iis version, for higher version(7.5) place modules inside system.webserver instead of system.web
// ]]></script>

 

4. Unrecognized targetFramework

<!–
[ConfigurationErrorsException]: Unrecognized attribute ‘targetFramework’. Note that attribute names are case-sensitive. (*****\web.config line 20)
at System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags)
[HttpException]: Unrecognized attribute ‘targetFramework’. Note that attribute names are case-sensitive. (******\web.config line 20)
at System.Web.HttpRuntime.FirstRequestInit(HttpContext context)
at System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)
at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
–>

open IIS -> Application Pools -> .NET Framework version

 

5. MVC yellow page, ‘Ajax’ not found

project reference System.Web.MVC right click , copy to local : true

6.Task.Factory.StartNew with uncaught Exceptions kills w3wp

http://stackoverflow.com/questions/5054750/task-factory-startnew-with-uncaught-exceptions-kills-w3wp

 

7. mismatch between processor architecture

in one solution, projects using different .net version or different build setting (extend: dependency loop)

WHERE CAN I FIND MY IIS LOG FILES? https://www.loganalyzer.net/log-analysis/iis-log-files.html

Below are for Windows Service

1. oracle client not compatible, check gactuil the version is 32bit or 64bit, and check project properties-> Build -> Platform target (Any CPU? Prefer 32-bit)

2.how to install windows service:

use windows cmd

use vs developer command prompt

3.can not stop windows service, end from task manager-> process

Integrated Mode

 

 

 

友荐云推荐