Ошибка примерно такая:
[HttpException (0x80004005): Обнаружено потенциально опасное значение Request.Path, полученное от клиента (:).]
System.Web.HttpRequest.ValidateInputIfRequiredByConfig() +9914812
System.Web.PipelineStepManager.ValidateHelper(HttpContext context) +53
Алгоритм следующий:
- Открываем IIS.
- Открываем наш сайт-публикацию в браузере.
- Идем в сопоставления обработчиков.
- Ищем ISAPI-dll и выделяем строку.
- Справа нажимаем «Добавить сопоставление сценария».
- Путь запроса — «*», Исполняемый файл — «C:….wsisapi.dll».
- Нажимаем «Да».
Если это не поможет, то можно попробовать следующее:

I was able to fix it by running
«C:Program Filesdotnetdotnet.exe» «C:fullpathPROJECT.dll»
on the command prompt, which gave me a much more meaningful error:
«The specified framework ‘Microsoft.NETCore.App’, version ‘1.0.1’ was
not found.
— Check application dependencies and target a framework version installed at:
C:Program FilesdotnetsharedMicrosoft.NETCore.App
— The following versions are installed:
1.0.0
— Alternatively, install the framework version ‘1.0.1’.
As you can see, I had the wrong NET Core version installed on my server. I was able to run my application after uninstalling the previous version 1.0.0 and installing the correct version 1.0.1.
ᴍᴀᴛᴛ ʙᴀᴋᴇʀ
2,7341 gold badge26 silver badges38 bronze badges
answered Feb 21, 2017 at 9:29
hatsrumandcodehatsrumandcode
1,8712 gold badges19 silver badges21 bronze badges
8
I had the same problem, in my case it was insufficient permission of the user identity of my Application Pool, on Publishing to IIS page of asp.net doc, there is a couple of reason listed for this error:
- If you published a self-contained application, confirm that you didn’t set a platform in
buildOptionsofproject.jsonthat conflicts with the publishing RID. For example, do not specify a platform of x86 and publish with an RID of win81-x64 (dotnet publish -c Release -r win81-x64). The project will publish without warning or error but fail with the above logged exceptions on the server. - Check the
processPathattribute on the<aspNetCore>element in web.config to confirm that it isdotnetfor a portable application or .my_application.exe for a self-contained application. - For a portable application,
dotnet.exemight not be accessible via the PATH settings. Confirm thatC:Program Filesdotnetexists in the System PATH settings. - For a portable application,
dotnet.exemight not be accessible for the user identity of the Application Pool. Confirm that the AppPool user identity has access to theC:Program Filesdotnetdirectory. - Confirm that you have correctly referenced the IIS Integration middleware by calling the
.UseIISIntegration()method of the application’sWebHostBuilder(). - If you are using the
.UseUrls()extension method when self-hosting with Kestrel, confirm that it is positioned before the.UseIISIntegration()extension method onWebHostBuilder()..UseIISIntegration()must set theUrlfor the reverse-proxy when running Kestrel behind IIS and not have its value overridden by.UseUrls().
In my case it was the fourth reason, I changed it by right clicking my app pool, and in advanced setting under Process Model, I set the Identity to a user with enough permission:
answered Jul 30, 2016 at 5:45
Hamid MosallaHamid Mosalla
3,2692 gold badges27 silver badges51 bronze badges
7
I got this working with a hard reset of IIS (I had only just installed the hosting package).
Turns out that just pressing ‘Restart’ in IIS Manager isn’t enough. I just had to open a command prompt and type ‘iisreset’
answered Nov 15, 2016 at 14:47
6
So I got a new server, this time it’s Windows 2008R2 and my app works fine.
I can’t say for sure what the problem was with the old server but I have one idea.
So because I previously compiled the app without any platform in mind it gave me the dll version which only works if the target host has .Net Core Windows Hosting package installed. In my case it was installed and that was fine.
After the app didn’t work I decieded to compile it as a console app with win7-x64 as runtime. This time the moment I ran the exe of my app on the server, it crashed with an error about a missing dll:
The program can't start because api-ms-win-crt-runtime-l1-1-0.dll is missing
That dll is from Universal C Runtime that’s included in the Visual C++ Redistributable for Visual Studio 2015.
I tried to install that package (both x64 & x86) but it failed each time (don’t know why) on Windows Server 2012 R2.
But when I tried to install them in the new server, Windows Server 2008 R2, they successfully installed. That might have been the reason behind it, but still can’t say for sure.
answered Jul 30, 2016 at 7:12
Vahid AmiriVahid Amiri
10.7k12 gold badges67 silver badges112 bronze badges
0
I had the same issue when publishing the web app.
If anybody still has this problem fixed it by changing {AppName}.runtimeconfig.json
{
"runtimeOptions": {
"framework": {
"name": "Microsoft.NETCore.App",
"version": "1.1.2"
},
"configProperties": {
"System.GC.Server": true
}
}
}
Change the version from «version»: «1.1.2» to «version»: «1.1.1» and everythign worked ok
answered Jun 18, 2017 at 21:53
nponpo
1,0608 silver badges9 bronze badges
I had the same problem.
To find out the exact source of it I switched on logging in
web.config file:
<aspNetCore processPath="dotnet" arguments=".MyWebService.dll" stdoutLogEnabled="**true**" stdoutLogFile=".logsstdout" />
and created logs subfolder in MyWebService root folder.
After restarting IIS and trying to execute API I got an error and it was missing of proper Core Runtime. After downloading an installing DotNetCore.1.0.5_1.1.2-WindowsHosting the error gone.
answered Nov 25, 2017 at 21:28
1
Had the same issue and all solutions didn’t work. Found this gem and thought I’d pass along if it helps someone else. Install on Server 2012 R2 getting the DLL missing error, try to reinstall VS C++ 2015 and get an error. Fix is to do the following:
Seems the file
C:ProgramDataPackage Cache...packagesPatchx64Windows8.1-KB2999226-x64.msu has problems being installed.
Open admin command prompt do:
c:
mkdir tmp
mkdir tmptmp
move "C:ProgramDataPackage Cache...packagesPatchx64Windows8.1-KB2999226-x64.msu" c:tmp
expand -F:* c:tmpWindows8.1-KB2999226-x64.msu c:tmptmp
dism /online /add-package /packagepath:c:tmptmpWindows8.1-KB2999226-x64.cab
NOTE: replace the «…» with the correct folder name. After this reinstall the VS C++ 2015 package.
answered Dec 14, 2016 at 20:58
Lee HarrisLee Harris
5214 silver badges12 bronze badges
I had a similar issue, and to quote Sherlock Holmes:
«when you have eliminated the impossible, whatever remains, however improbable, must be the truth?«
I checked if the .NET framework I was targeting was installed on the server, and it turns out it wasn’t. I installed the 4.6.2 .NET Framework and it worked.
bfontaine
17.8k13 gold badges71 silver badges103 bronze badges
answered Jan 13, 2017 at 22:42
I got this issue on my production server after my VS project was automatically upgraded to .NET Core 1.1.2.
I simply installed the 1.1.2 .net core runtime from here on my production server: https://www.microsoft.com/net/download/core#/runtime
answered Sep 6, 2017 at 15:33
Rikard AskelöfRikard Askelöf
2,7173 gold badges20 silver badges24 bronze badges
1
SOLVED I just ran through the same issue today while deploying to AZURE. Then I tried the same for local IIS, got the same issue. As I am new to .net CORE, struggled few hour before I actually solved it.
In our solution, after I publish to IIS, I observed my web.confile file, specially below line <aspNetCore processPath="binIISSupportVSIISExeLauncher.exe" arguments="-argFile IISExeLauncherArgs.txt" forwardWindowsAuthToken="false" stdoutLogEnabled="false" />
In our deployment folder the generated web.config looks like:<aspNetCore processPath="dotnet" arguments=".Yodlee.dll -argFile IISExeLauncherArgs.txt" forwardWindowsAuthToken="false" stdoutLogEnabled="false" stdoutLogFile=".logsstdout" />
Now PLEASE try changing the above configuration in visual studio solution to<aspNetCore processPath="binIISSupportVSIISExeLauncher.exe" forwardWindowsAuthToken="false" stdoutLogEnabled="false" />
In our new deployment folder the generated web.config looks like:<aspNetCore processPath="dotnet" arguments=".Yodlee.dll" forwardWindowsAuthToken="false" stdoutLogEnabled="false" stdoutLogFile=".logsstdout" />
And This SOLVED my problem, Hope it help.
answered Feb 13, 2018 at 7:53
AgniAgni
4185 silver badges15 bronze badges
2
I had the same problem when I updated my dev machine to Core 1.0.1, but forgot to update the server.
answered Nov 4, 2016 at 16:00
Alex DreskoAlex Dresko
5,1653 gold badges37 silver badges57 bronze badges
2
I was getting HTTP Error 502.5 while trying to publish my .NET Core 2.0 API to AWS EB, and solved it by adding the following code to the .csproj:
<PropertyGroup>
<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
</PropertyGroup>
answered Jan 15, 2018 at 18:04
Matheus LacerdaMatheus Lacerda
5,98511 gold badges28 silver badges44 bronze badges
I had a same issue . I changed application pool identity to network service account . Then I explicitly set the path to dotnet.exe in the web.config for the application to work properly as @danielyewright said in his github comment . It works after set the path.
Thanks
answered Nov 28, 2016 at 21:07
vikvik
571 silver badge9 bronze badges
Sharing that in my case this error was because i forgot to update project.json with:
"buildOptions": {
"emitEntryPoint": true
}
answered Dec 9, 2016 at 10:39
vinjenzovinjenzo
1,48013 silver badges13 bronze badges
I had the same error in question, with the same issues as described by VSG24 in Proposed answer — nasty error message when typing ‘dotnet’ into CMD:
The program can’t start because api-ms-win-crt-runtime-l1-1-0.dll is missing
I solved this by manually installing the following 2 updates on Windows Server 2012 R2 (and the pre-requisites and all the other updates linked — read the installation instructions carefully on the Microsoft website):
- KB2919355
- KB2999226
Hope this helps someone.
answered Mar 23, 2017 at 8:39
Johan FoleyJohan Foley
3884 silver badges9 bronze badges
I faced the same issue when I tried to publish Debug version of my web application. This set of files didn’t contain the file web.config with the proper value of attribute processPath.
I took this file from Release version, value was assigned to the path to my exe file.
<aspNetCore processPath=".My.Web.App.exe" ... />
answered May 12, 2017 at 11:06
BarabasBarabas
8928 silver badges18 bronze badges
In my case was problem with Net Core version installed on server.
I just install the same version as on my development machine and everything is OK 
answered Jun 2, 2017 at 14:11
Here is what I figured, and this happened recently on Windows 10 after an update was installed. From what I gathered, a Windows Defender update was installed which assumed my «Project.dll»(an asp.net core project) behaved like a virus so it was deleted.
So, one of the first things I suggest you do before you start installing/uninstalling stuffs is to check to confirm your «Project.dll» is where it should be.
Copy it back to the location if it is no longer there.
If you are having difficulty copying the file back add an exclusion to your project folder in windows defender. ( Learn how to do that here. )
This worked for me instantly, and I repeated it across application multiple servers.
answered Oct 10, 2017 at 8:26
I needed to install the latest .net Core version found here.
No need to restart the site or server
answered Apr 17, 2018 at 13:26
DirtyNativeDirtyNative
2,4632 gold badges31 silver badges58 bronze badges
I solved it by adding «edit permission» to the application of the site, mapped to the physical directory and then selected the windows user that could have access to this root folder. (private network).
answered May 24, 2018 at 16:04
Antonin GAVRELAntonin GAVREL
9,4368 gold badges52 silver badges78 bronze badges
In my case, after installing AspNetCore.2.0.6.RuntimePackageStore_x64.exe and DotNetCore.2.0.6-WindowsHosting.exe , I need to restart server to make it worked without 502 bad gateway and proxy error.
UPDATE:
There is a way you could use it without restart:
https://stackoverflow.com/a/50808634/3634867
answered Apr 12, 2018 at 7:30
John JangJohn Jang
2,47924 silver badges28 bronze badges
Open command prompt with Administrator credentials
Type following command and hit enter
> IISRESET
OR
Open Visual Studio 2017 with Administrator credentials
Type following command in Package Manager Console and hit enter
PM> IISRESET
PM> IISRESET
Attempting stop...
Internet services successfully stopped
Attempting start...
Internet services successfully restarted
answered Dec 13, 2018 at 7:07
Akshay MishraAkshay Mishra
1,4652 gold badges15 silver badges14 bronze badges
I had this problem aswell (The error occurred both on VS 15 and 17). However on VS15 it returned a CONNECTION_REFUSED error and on VS17 it returned ASP.NET Core 1.0 on IIS error 502.5.
FIX
-
Navigate to your project directory and locate the hidden folder
.vs(it’s located in the projects folder dir). (Remember to show hidden files/folders) -
Close VS
- Delete .vs-folder
- Start VS as admin (.vs-folder will be recreated by VS)
answered Mar 30, 2017 at 14:44
UniccoUnicco
2,3861 gold badge25 silver badges30 bronze badges
For me it was that the connectionString in Startup.cs was null in:
services.AddDbContext<ApplicationDbContext>(options => options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
and it was null because the application was not looking into appsettings.json for the connection string.
Had to change Program.cs to:
public static void Main(string[] args)
{
BuildWebHost(args).Run();
}
public static IWebHost BuildWebHost(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.ConfigureAppConfiguration((context, builder) => builder.SetBasePath(context.HostingEnvironment.ContentRootPath)
.AddJsonFile("appsettings.json").Build())
.UseStartup<Startup>().Build();
answered Dec 13, 2017 at 10:37
Andrei DobrinAndrei Dobrin
1,1644 gold badges19 silver badges35 bronze badges
I have no idea why this worked for me, but I am using Windows Authentication and I had this bit of code on my BuildWebHost in Program.cs:
.UseStartup<Startup>()
.UseHttpSys(options =>
{
options.Authentication.Schemes =
AuthenticationSchemes.NTLM | AuthenticationSchemes.Negotiate;
options.Authentication.AllowAnonymous = false;
})
.Build();
After removing the .UserHttpSys bit, it now works, and I can still authenticate as a domain user.
BuildWebHost now looks like
public static IWebHost BuildWebHost(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>()
.Build();
answered Jan 14, 2018 at 21:59
BassieBassie
9,2907 gold badges63 silver badges150 bronze badges
2
I was getting the same error, and found out the problem was that during the publish to Azure, my web.config file was modified so this following line ended up like this:
<aspNetCore processPath="binIISSupportVSIISExeLauncher.exe" arguments="-argFile IISExeLauncherArgs.txt" forwardWindowsAuthToken="false" stdoutLogEnabled="false" startupTimeLimit="3600" requestTimeout="23:00:00" />
The problem for Production are the contents of the arguments: «-argFile IISExeLauncherArgs.txt»
It seems like this issue is going to be addressed in the next .NET Core SDK (currently in preview), but for now, the workaround is to add this block to the .csproj file:
<Target Name="bug_242_workaround" AfterTargets="_TransformWebConfig">
<Exec Command="powershell "(Get-Content '$(PublishDir)Web.config').replace(' -argFile IISExeLauncherArgs.txt', '') | Set-Content '$(PublishDir)Web.config'"" />
</Target>
This will modify the web.config and remove the problematic part for publishing.
Reference: https://github.com/aspnet/websdk/issues/242
Hope it helps.
answered Apr 6, 2018 at 18:36
Rodrigo PiresRodrigo Pires
5642 gold badges11 silver badges23 bronze badges
1
Worked for me after changing the publishing configuration.
answered Nov 27, 2018 at 9:30
MAFAIZMAFAIZ
6816 silver badges13 bronze badges
1
For me it was caused by having different versions of .Net Core installed. I matched my dev and production server and it worked.
answered Dec 30, 2018 at 8:34
CarlaCarla
517 bronze badges
I had a similar issue (Asp.Net Core 2.x) that was caused by trying to run a 32-bit asp.net core app in IIS on a 64-bit windows server. The root cause was that the web.config that is auto-generated (if your project does not explicitly include one, which asp.net core projects do not by default) does not contain the full path to the dotnet executable. When you install the hosting bundle on a 64 bit machine it will install the 64 and 32 bit versions of dotnet, but the path will resolve by default to 64 bit and your 32 bit asp.net core app will fail to load. In your browser you may see a 502.5 error and if you look the server event log you might see error code 0x80004005. If you try to run dotnet.exe from a command prompt to load your asp.net core application dll on that server you may see an error like «BadImageFormatException» or «attempt was made to load a program with an incorrect format». The fix that worked for me was to add a web.config to my project (and deployment) and in that web.config set the full path to the 32-bit version of dotnet.exe.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="C:Program Files (x86)dotnetdotnet.exe" arguments=".My32BitAspNetCoreApp.dll" stdoutLogEnabled="false" stdoutLogFile=".logsstdout" />
</system.webServer>
</location>
</configuration>
answered Nov 30, 2018 at 18:29
NathanNathan
1,0167 silver badges16 bronze badges
I got the same problem and the reason in my case was that the EF core was trying to read connection string from appsettings.development.json file. I opened it and found the connection string was commented.
//{
// "ConnectionStrings": {
// "DefaultConnection": "Server=vaio;Database=Goldentaurus;Trusted_Connection=True;",
// "IdentityConnection": "Server=vaio;Database=GTIdentity;Trusted_Connection=True;"
// }
//}
I then uncommitted them like below and the problem solved:
{
"ConnectionStrings": {
"DefaultConnection": "Server=vaio;Database=Goldentaurus;Trusted_Connection=True;",
"IdentityConnection": "Server=vaio;Database=GTIdentity;Trusted_Connection=True;"
}
}
answered Jan 7, 2019 at 10:50
yogihostingyogihosting
5,4068 gold badges47 silver badges78 bronze badges
- Remove From My Forums
-
Question
-
Hi,
I tried to confiure sql reporting service on vista box but I got the following page.
Server Error in ‘/Reports’ Application.
Request is not available in this context
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Request is not available in this context
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:[HttpException (0x80004005): Request is not available in this context] System.Web.HttpContext.get_Request() +3465893 Microsoft.ReportingServices.UI.Global.get_ConfigurationManager() +47 Microsoft.ReportingServices.UI.GlobalApp.Application_Start(Object sender, EventArgs e) +32 [HttpException (0x80004005): Request is not available in this context] System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +3385130 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +125 System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +182 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +259 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +245 [HttpException (0x80004005): Request is not available in this context] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +3465475 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +69 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +675
I tried a lot of searches online but could not find any solutions. I am running Vista Ultimate, SQL Server 2005 and IIS 7. I am sure I configure everything right under «Default Web Site». The same config is running perfectly under XP. Can anyone help please?
Answers
-
That’s good news. If it’s asking for authentication, that means the site should be at least working.
If you go back to the first KB Article we posted (http://support.microsoft.com/kb/934164) there is a section at the bottom that talks about setting up the authentication. They are steps 7 and 8 under «Install SQL Server 2005 Reporting Services».
That should clear up the prompt.
-
Step #7 should have nothing to do with IIS or SSRS. That’s just changing site settings in Internet Explorer options. One thing you may check is the «Require SSL» checkbox in the Trusted sites. If that’s checked, IE may be redirecting you to port 443, which probably isn’t listening.
You may also check under Windows Services and make sure that the Reporting Services service is started. Because if it’s an SSL thing it’s odd, that it would know that «report server» is not responding. Normally it would be something like a 404 error, or something like that.
Ошибка примерно такая:
[HttpException (0x80004005): Обнаружено потенциально опасное значение Request.Path, полученное от клиента (:).]
System.Web.HttpRequest.ValidateInputIfRequiredByConfig() +9914812
System.Web.PipelineStepManager.ValidateHelper(HttpContext context) +53
Алгоритм следующий:
- Открываем IIS.
- Открываем наш сайт-публикацию в браузере.
- Идем в сопоставления обработчиков.
- Ищем ISAPI-dll и выделяем строку.
- Справа нажимаем “Добавить сопоставление сценария”.
- Путь запроса – “*”, Исполняемый файл – “C:….wsisapi.dll”.
- Нажимаем “Да”.
Если это не поможет, то можно попробовать следующее:
Источник.
Category: 1C
- Remove From My Forums
-
Question
-
To whom it may concern,
I am creating a website in VB with HTML and CSS using Web Forms in Visual Studio 2013 Express for Web along with the built-in JQuery and Bootstrap add-ins. However, if I create a new project and start it using the green arrow button it states Server error
‘/’ Application.Specified argument was out of the range of valid values.
Parameter name: siteDescription: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: siteSource Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.Stack Trace:
[ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: site] System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +303 [HttpException (0x80004005): Specified argument was out of the range of valid values. Parameter name: site] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9885060 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34009
Please note I have not hooked it up to a «real» domain, I am using the localhost:#####.
Any solutions and explanations about the issue would be greatly appreciated!
Thanks,
Coder 206
Coder 206
Answers
-
Hi Coder 206,
This error occurs mainly because the IIS feature is disabled by default in your computer, you could open it in the control Panel.
Control Panel ->> Programs ->> Programs and Features ->> Turn Windows features on or off ->> Internent Information Services
If you have any other concern regarding this issue, please feel free to let me know.
Best regards,
Youjun Tang
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.-
Marked as answer by
Thursday, September 18, 2014 2:12 AM
-
Marked as answer by



