ASP.NET 5: Error with Nuget package in Class library Package - asp.net-core
I start playing with VS2015 community version and ASP.NET 5.
I have added a new class library (Package) as a new project into my solution but am unable to install a NuGet package in it. After the restoring, I have a "Reference (Errors - see Error List)".
If i add a basic Library Class (.dll) as a new project into my solution and try to install the same NuGet package, it works beautifully as it used to.
Perhaps, I am misunderstanding how this new class library package works and I am trying to misuse it...
Thanks for your help.
--------------------------------------------------------------EDIT 1-----------------------------------------------------------
Project.json: The warning flag in that case is on the EF package:
{
"version": "1.0.0-*",
"description": "testFinal Class Library",
"authors": [ "SylvainC" ],
"tags": [ "" ],
"projectUrl": "",
"licenseUrl": "",
"dependencies": {
"System.Collections": "4.0.10-beta-23019",
"System.Linq": "4.0.0-beta-23019",
"System.Threading": "4.0.10-beta-23019",
"System.Runtime": "4.0.10-beta-23019",
"Microsoft.CSharp": "4.0.0-beta-23019",
"EntityFramework": "6.1.3"
},
"frameworks": {
"dotnet": { }
}
}
----------------------------------------------------EDIT 1 bis after update to beta8--------------------------
{
"version": "1.0.0-*",
"description": "ClassLibrary5 Class Library",
"authors": [ "SylvainC" ],
"tags": [ "" ],
"projectUrl": "",
"licenseUrl": "",
"frameworks": {
"dnx451": { }
},
"dependencies": {
"EntityFramework": "6.1.3"
}
}
--------------------------------------------------------------EDIT 2-----------------------------------------------------------
After upgrading the dnvm (dvnm upgrade), i was able to run the "dnu restore" command but got the following error:
>dnu restore
Microsoft .NET Development Utility Clr-x86-1.0.0-beta8-15858
GET https://www.nuget.org/api/v2/
GET https://www.myget.org/F/aspnetmaster/api/v2/
Restoring packages for D:\testFinal\project.json
GET https://www.nuget.org/api/v2/FindPackagesById()?id='System.Reflection'
GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?id='System.Reflection'
GET https://www.nuget.org/api/v2/FindPackagesById()?id='System.Globalization'
GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?id='System.Globalization'
GET https://www.nuget.org/api/v2/FindPackagesById()?id='EntityFramework'
GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?id='EntityFramework'
Warning: FindPackagesById: System.Globalization
An error occurred while sending the request.
Warning: FindPackagesById: System.Globalization
An error occurred while sending the request.
Warning: FindPackagesById: System.Reflection
An error occurred while sending the request.
GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?id='System.Globalization'
GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?id='System.Reflection'
GET https://www.nuget.org/api/v2/FindPackagesById()?id='System.Globalization'
Warning: FindPackagesById: System.Reflection
An error occurred while sending the request.
GET https://www.nuget.org/api/v2/FindPackagesById()?id='System.Reflection'
Warning: FindPackagesById: EntityFramework
An error occurred while sending the request.
Warning: FindPackagesById: EntityFramework
An error occurred while sending the request.
GET https://www.nuget.org/api/v2/FindPackagesById()?id='EntityFramework'
GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?id='EntityFramework'
Warning: FindPackagesById: System.Reflection
An error occurred while sending the request.
GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?id='System.Reflection'
Warning: FindPackagesById: System.Globalization
An error occurred while sending the request.
Warning: FindPackagesById: System.Globalization
An error occurred while sending the request.
GET https://www.nuget.org/api/v2/FindPackagesById()?id='System.Globalization'
GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?id='System.Globalization'
Warning: FindPackagesById: System.Reflection
An error occurred while sending the request.
GET https://www.nuget.org/api/v2/FindPackagesById()?id='System.Reflection'
Warning: FindPackagesById: EntityFramework
An error occurred while sending the request.
GET https://www.nuget.org/api/v2/FindPackagesById()?id='EntityFramework'
Warning: FindPackagesById: EntityFramework
An error occurred while sending the request.
GET https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?id='EntityFramework'
Error: FindPackagesById: System.Reflection
An error occurred while sending the request.
----------
Error: FindPackagesById: System.Globalization
An error occurred while sending the request.
Error: FindPackagesById: System.Globalization
An error occurred while sending the request.
System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:8888
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
--- End of inner exception stack trace ---
---------------------------------------------EDIT 3 with final error and feeds------------------------------
Restore failed
An error occurred while sending the request.
NuGet Config files used:
C:\Users\sylvainc\AppData\Roaming\NuGet\nuget.config
Feeds used:
https://www.nuget.org/api/v2/
https://www.myget.org/F/aspnetmaster/api/v2/
Sylvain
It seems to be a proxy issue giving me this No connection could be made because the target machine actively refused it 127.0.0.1:8888 error.
Tracking it down with Fiddler, I discovered that after opening Fiddler, the restore process and adding new Nuget packages was working fine. A situation quite similar to this post Why calling API in ASP.NET works only if I have Fiddler open? or here: http://www.telerik.com/blogs/help!-running-fiddler-fixes-my-app-.
I also tried to create a dnx.exe.config into C:\Users\sylvainc\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta8\bin as suggested in http://github.com/aspnet/dnx/issues/451.
Unfortunately it seems not to work with the beta8 version.
My first workaround solution was to use the HTTP protocol to access my NuGet packages as suggested here: Visual Studio 2015 - Can't sign in, Use NuGet, etc. behind corporate proxy.
My final solution was to edit the machine.config file as administrator with Notepad+ in C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config to get ride of the fiddler default proxy definition and to use the system ones:
<!--<system.net>
<defaultProxy enabled="true" useDefaultCredentials="true">
<proxy autoDetect="false" bypassonlocal="false" proxyaddress="http://127.0.0.1:8888" usesystemdefault="false"/>
</defaultProxy>
</system.net>-->
<system.net>
<defaultProxy useDefaultCredentials="true" enabled="true">
<proxy usesystemdefault="True"/>
</defaultProxy>
</system.net>
Now ASP.Net 5 works fine, I even have my intellisense working properly now which was not the case before with the other proxy definition...
Thanks
Sylvain
Be sure you installed the latest tooling for Visual studio. Your project.json seems to be wrong.
Check your nuget feed in visual studio for invalid feed and remove these sources.
Check your active dnx (*)
dnvm list
Active Version Runtime Architecture OperatingSystem Alias
1.0.0-beta4 clr x86 win
1.0.0-beta7 clr x64 win
1.0.0-beta7 clr x86 win b7
1.0.0-beta7 coreclr x64 win
1.0.0-beta7 coreclr x86 win
1.0.0-beta8 clr x64 win
* 1.0.0-beta8 clr x86 win aa, b8
1.0.0-beta8 coreclr x64 win
1.0.0-beta8 coreclr x86 win
1.0.0-rc1-15838 clr x86 win rc1a
1.0.0-rc1-16031 clr x86 win default
1.0.0-rc1-16031 coreclr x86 win
With the tools->nuget package manager-package manager for solution
* Select a package source and test if a package source give any errors
* find out in which nuget feed your package is available
At the end of the dnu output there is a list which config and feeds are used
NuGet Config files used:
C:\Users\Thom\AppData\Roaming\NuGet\nuget.config
Feeds used:
https://api.nuget.org/v3-flatcontainer/
https://www.myget.org/F/aspnetrelease/api/v3/flatcontainer/
Use the dnu restore -? to find the source of the problem.
try this
dnu restore --no-cache --packages .\packages1
Try a package.json like this
{
"version": "1.0.0-*",
"description": "ClassLibrary3 Class Library",
"authors": [ "Thom" ],
"tags": [ "" ],
"projectUrl": "",
"licenseUrl": "",
"dependencies": {
"EntityFramework": "6.1.3"
},
"frameworks": {
"dnx451": { },
}
}
In my case, the package source was pointing to http://packagesource. Changing it to https://www.nuget.org/api/v2/ fixed the probmel
Related
vscode Fail to Debug Express Webapp
I'm trying to debug express (node) app on my machine, but debug does not start with no indication what so ever. This happens on code I'm able to debug on another machine as well as "new" apps created in order to test this issue. I followed the instructions on vscode site (https://code.visualstudio.com/docs/nodejs/nodejs-debugging) with no success. Runtime works great - just fail to debug. Behavior consist on all machine's users (admin/non-admin) Does anyone have a clue? My environment setup is: operating System: Windows 10 Pro version 1803 node version: v10.13.0 vscode version: 1.28.2 This is vscode's trace (note the target not opened warning): OS: win32 x64 Adapter node: v8.9.3 x64 vscode-chrome-debug-core: 6.7.19 11:20:18 AM, 11/7/2018 node-debug2: 1.28.3 From client: initialize({"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"node2","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en-us"}) To client: {"seq":0,"type":"response","request_seq":1,"command":"initialize","success":true,"body":{"exceptionBreakpointFilters":[{"label":"All Exceptions","filter":"all","default":false},{"label":"Uncaught Exceptions","filter":"uncaught","default":false}],"supportsConfigurationDoneRequest":true,"supportsSetVariable":true,"supportsConditionalBreakpoints":true,"supportsCompletionsRequest":true,"supportsHitConditionalBreakpoints":true,"supportsRestartFrame":true,"supportsExceptionInfoRequest":true,"supportsDelayedStackTraceLoading":true,"supportsValueFormattingOptions":true,"supportsEvaluateForHovers":true,"supportsLoadedSourcesRequest":true,"supportsLogPoints":true,"supportsTerminateRequest":false}} To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"ClientRequest/initialize","data":{"Versions.DebugAdapterCore":"6.7.19","Versions.DebugAdapter":"1.28.3","successful":"true","timeTakenInMilliseconds":"3.774888","requestType":"request"}}} From client: attach({"type":"node2","request":"attach","name":"Attach by Process ID","trace":true,"cwd":"c:\\Users\\roi\\dev\\janus\\src\\tools\\magento2-importer","port":9229,"protocol":"inspector","logFilePath":"c:\\Users\\roi\\AppData\\Roaming\\Code\\logs\\20181107T103352\\exthost1\\ms-vscode.node-debug\\debugadapter.txt","__sessionId":"910bc34a-3629-46b7-8c57-e89c06f5bda0"}) To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"debugStarted","data":{"Versions.DebugAdapterCore":"6.7.19","Versions.DebugAdapter":"1.28.3","request":"attach","args":["type","request","name","trace","cwd","port","protocol","logFilePath","__sessionId","enableSourceMapCaching","sourceMapPathOverrides","showAsyncStacks","sourceMaps"]}}} Getting browser and debug protocol version via http://127.0.0.1:9229/json/version Discovering targets via http://127.0.0.1:9229/json/list Got browser version: node.js/v10.13.0 Got debug protocol version: 1.1 To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"targetDebugProtocolVersion","data":{"Versions.DebugAdapterCore":"6.7.19","Versions.DebugAdapter":"1.28.3"}}} To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"targetCount","data":{"Versions.DebugAdapterCore":"6.7.19","Versions.DebugAdapter":"1.28.3","numTargets":1}}} Attaching to target: {"description":"node.js instance","devtoolsFrontendUrl":"chrome-devtools://devtools/bundled/js_app.html?experiments=true&v8only=true&ws=localhost/a575db9e-d5a5-46a5-a49c-a553228c7493","devtoolsFrontendUrlCompat":"chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=localhost/a575db9e-d5a5-46a5-a49c-a553228c7493","faviconUrl":"https://nodejs.org/static/favicon.ico","id":"a575db9e-d5a5-46a5-a49c-a553228c7493","title":"dist/server.js","type":"node","url":"file://C:_Users_roi_dev_janus_src_tools_magento2-importer_dist_server.js","webSocketDebuggerUrl":"ws://127.0.0.1:9229/a575db9e-d5a5-46a5-a49c-a553228c7493","version":{}} WebSocket Url: ws://127.0.0.1:9229/a575db9e-d5a5-46a5-a49c-a553228c7493 → To target: "{\"id\":1,\"method\":\"Console.enable\"}" → To target: "{\"id\":2,\"method\":\"Debugger.enable\"}" → To target: "{\"id\":3,\"method\":\"Runtime.enable\"}" → To target: "{\"id\":4,\"method\":\"Log.enable\"}" → To target: "{\"id\":5,\"method\":\"Runtime.runIfWaitingForDebugger\"}" → Warning: Target not open! Message: "{\"id\":6,\"method\":\"Runtime.run\"}" Websocket closed Terminated: websocket closed Waiting for any pending steps or log messages. Current step and log messages complete To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"debugStopped","data":{"Versions.DebugAdapterCore":"6.7.19","Versions.DebugAdapter":"1.28.3","reason":"websocket closed"}}} To client: {"seq":0,"type":"event","event":"terminated"} From client: disconnect({"restart":false}) To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"FullSessionStatistics/SourceMaps/Overrides","data":{"Versions.DebugAdapterCore":"6.7.19","Versions.DebugAdapter":"1.28.3","aspNetClientAppFallbackCount":0}}} To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"report-start-up-timings","data":{"Versions.DebugAdapterCore":"6.7.19","Versions.DebugAdapter":"1.28.3","RequestedContentWasDetected":"false","Steps":"[\"BeforeFirstStep\",\"ClientRequest/initialize\",\"ClientRequest/attach\",\"Attach\",\"Attach.RequestDebuggerTargetsInformation\",\"Attach.ProcessDebuggerTargetsInformation\",\"Attach.AttachToTargetDebuggerWebsocket\",\"Attach.ConfigureDebuggingSession.Internal\",\"Attach.ConfigureDebuggingSession.Target\"]","All":"380.614371","BeforeFirstStep":"[18.487202]","WaitingAfter.ClientRequest/initialize":"[22.151169]","ClientRequest/initialize":"[4.841868]","ClientRequest/attach":"[4.11239]","Attach":"[8.248859]","Attach.RequestDebuggerTargetsInformation":"[12.433092]","Attach.ProcessDebuggerTargetsInformation":"[0.720004]","Attach.AttachToTargetDebuggerWebsocket":"[317.133643]","Attach.ConfigureDebuggingSession.Internal":"[0.81632]","Attach.ConfigureDebuggingSession.Target":"[13.309018]","RequestedContentWasNotDetectedReason":"shutdown"}}} Terminated: Got disconnect request To client: {"seq":0,"type":"response","request_seq":3,"command":"disconnect","success":true} To client: {"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"ClientRequest/disconnect","data":{"Versions.DebugAdapterCore":"6.7.19","Versions.DebugAdapter":"1.28.3","successful":"true","timeTakenInMilliseconds":"2.443434","requestType":"request"}}} This is snippet of vscode screen after debuger was attached. as you can see debugger was attached, but no debug tool bar is present (and no breaks on breakpoints):
You can try to add launch.json by go to Debug->Add Configuration And then choose Node.js Attach To Process { "version": "0.2.0", "configurations": [ { "type": "node", "request": "attach", "name": "Attach by Process ID", "processId": "${command:PickProcess}" }, { "name": "Attach", "type": "node", "request": "attach", "port": Your Port, "address": "localhost", "restart": false, "sourceMaps": false, "outDir": null, "localRoot": "${workspaceRoot}", "remoteRoot": null } ] } Then run you server as usual, for example > nodemon app.js Set breakpoints And hit Start Debugging The debugger should kick in and you should smile :)
How can I get the Amazon Cognito Identity SDK working in Aurelia?
I am trying to get the Amazon Cognito Identity SDK working in Aurelia. I do not have a lot of Javascript experience and am very unfamiliar with the various dependency systems. I installed the Cognito SDK using: npm install --save amazon-cognito-identity-js I then edited my aurelia_project/aurelia.json file as suggested in the Aurelia documentation to include a new client library dependency in build.bundles vendor-bundle dependencies: "sjcl", "jsbn", { "name": "aws-sdk", "path": "../node_modules/aws-sdk/", "main": "dist/aws-sdk" }, { "name": "amazon-cognito-identity-js", "path": "../node_modules/amazon-cognito-identity-js/dist", "main": "amazon-cognito-identity.min" } However, when I try to run the code using au run I get the error: Error: ENOENT: no such file or directory, open '/Users/nathanskone/Projects/scc/aurelia-app/src/xmlbuilder.js' I have tried to include xmlbuilder in my aurelia.json to no avail. When it is included I end up getting this error about lodash: Error: ENOENT: no such file or directory, open '/Users/nathanskone/Projects/scc/aurelia-app/src/lodash/object/assign.js' I haven't found any way to get past the lodash error. Is there anyone out there familiar with the Aurelia dependency system that could help? Thanks, Nathan EDIT #2: While I got past the xmlbuilder/lodash errors, I have run into further errors trying to bundle the aws-sdk. Here is my current aurelia.json: "dependencies": [ { "name": "xmlbuilder", "path": "../node_modules/xmlbuilder/lib", "main": "index" }, { "name": "aws-sdk", "path": "../node_modules/aws-sdk", "main": "index", "resources": ["lib/region_config.json"] }, And the error I am currently getting: Error: ENOENT: no such file or directory, open '/Users/nathanskone/Projects/scc/aurelia-app/src/crypto.js' If I remove the resources (lib/region_config.json) then I get this error instead: Error: ENOENT: no such file or directory, open '/Users/nathanskone/Projects/scc/aurelia-app/node_modules/aws-sdk/lib/region_config.json.js' I think crypto is actually an object defined in aws-sdk/lib/util.js, which is required by aws-sdk/lib/region_config.js.
Try the compiled library instead, using the compiled lib bundled just fine. Also the library seems to define window.AWS, so injecting it or not will work { "name": "aws-sdk", "path": "../node_modules/aws-sdk/dist", "main": "aws-sdk.min", "exports": "AWS" } UPDATE: It seems the only way to import those libraries is by using the prepend section, the libraries write to the window variable so it can still be accesible to your app scripts, only by not importing them like ES6 modules. "prepend": [ "node_modules/aws-sdk/dist/aws-sdk.min.js", "node_modules/amazon-cognito-identity-js/dist/aws-cognito-sdk.min.js", "node_modules/amazon-cognito-identity-js/dist/amazon-cognito-identity.min.js", "node_modules/bluebird/js/browser/bluebird.core.js", "scripts/require.js" ],
Gulp task to web deploy from Visual Studio
I have not found a concrete example on how to do the publishing via a Gulp Task. Anyone has an idea? This is how i'm trying at the moment. gulp.task("Deploy-To-Azure", function() { var targets = ["Build"]; console.log("Publishing to Azure"); return gulp.src(["./src/Feature/Accounts/code"]) .pipe(foreach(function (stream, file) { return stream .pipe(debug({ title: "Building project:" })) .pipe(msbuild({ targets: targets, configuration: "Azure", logCommand: false, verbosity: "verbose", stdout: true, errorOnFail: true, maxcpucount: 0, toolsVersion: 14.0, properties: { DeployOnBuild: "true", DeployDefaultTarget: "Web Deploy", WebPublishMethod: "FileSystem", DeleteExistingFiles: "false", _FindDependencies: "false", Configuration: "Release" } })) .pipe(debug({title: "Finished building project"})); })); }); But it looks like the project is built but not deployed. I think my properties are not complete. Any ideas are appreciated. Thank you
I attempted to use those same MSBuild properties from the commandline and received the following error: >c:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild /p:DeployOnBuild=true /p:WebPub lishMethod=FileSystem /p:DeleteExistingFiles=false /p:DeployDefaultTarget="Web Deploy" C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.P ublishing.targets(4449,11): error MSB4057: The target "Web Deploy" does not exi st in the project. [c:\users\me\documents\visual studio 2015\projects\w ebapplication12\WebApplication12.csproj] Unless you've created a custom MSBuild Target named "Web Deploy". This won't work. When I remove the /p:DeployDefaultTarget="Web Deploy" property a WebDeploy package is created in the /obj/[configuration]/Package folder.
Try DeployDefaultTarget: "WebPublish"
System.InvalidOperationException : Migration failed
My solution have 3 projects : Web (i added the connection string in the appsetting file) Business (contains models class) Infrastructure (contains DbContext) I tried to make a migration : dnx ef migration add firstMigration -s Web I had this error : System.InvalidOperationException: The current runtime target framework is not compatible with 'Infrastructure'. Current runtime target framework: 'DNX,Version=v4.5.1 (dnx451)' Version: 1.0.0-rc1-16202 Type: Clr Architecture: x86 OS Name: Windows OS Version: 10.0 Runtime Id: win10-x86 Please make sure the runtime matches a framework specified in project.json When i put dnvm list, i have 1.0.0-rc1-final like a default runtime and i don't find 1.0.0*rc1-16202 in the list ? The projet.json file of Infrastuture project is : "frameworks": { "dotnet5.4": { }, "net451": { "EntityFramework.Commands": "7.0.0-rc1-final", "frameworkAssemblies": { "System.Runtime": "4.0.10.0" } } }
I had the same problem and I solved it by changing "net451" to "dnx451" in the project.json file under the "frameworks" object.
It's ok now, it was my mistake : i executed the command (dnx ef migrations add) in Infrasturtucre folder instead of web folder.
appDomainCreationException in IIS Express using ASP.NET 5 beta7
After updating my app to beta7 I'm unable to run it from IIS Express using either view in browser or running it in the debugger it shows this exception in the browser but doesn't break on any exception in my code using the debugger: [Exception: Unexpected application failure. Status code '-2147024894'.] System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException) +361 [HttpException (0x80004005): Unexpected application failure. Status code '-2147024894'.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +579 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +120 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +712 I am able to run it using dnx web from the command line with no errors. I tried with a new web app using the vs template and that one runs fine in IIS Express so it must be something specific about my app but I have no idea what since it doesn't break on any error in my code when running in the debugger. Anyone have any idea what could be causing this or what kind of thing to check in my app or configuration to solve it? Note that dnvm list shows my default runtime as beta7 coreclr x64 which is also what I have set as the specific runtime in the web app properties and in global.json
after much debugging I figured out that the problem was caused because it was not really launching the app with beta7, it was really using beta6 runtime even though the project, my profile, and global.json were all configured to use beta7. The reason it was doing that was because there is a Web.config file in my wwwroot folder with the following appSettings: <appSettings> <add key="bootstrapper-version" value="1.0.0-beta6" /> <add key="dnx-version" value="1.0.0-beta6" /> <add key="dnx-clr" value="coreclr" /> </appSettings> after updating those to beta7 it now works as it should in IIS. the reason why it worked from the command line is because web.config is only used by IIS
I had the same issue. I installed a new runtime environment with the dot net version manager: dnvm install latest -r coreclr -arch x64 which installed and used 1.0.0-beta7 coreclr x64 Then in my solution's global.json I set the sdk to the beta7 version { "projects": [ "src", "test" ], "sdk": { "version": "1.0.0-beta7" } } and I was getting the [Exception: Unexpected application failure. Status code '-2147024894'.] Your answer pointed me in the right direction. It was as if the IIS didn't match.. So I went to my project.json and set the dependencies for the AspNet.Server to the right version 1.0.0-beta7 { "webroot": "wwwroot", "version": "1.0.0-*", "dependencies": { "Microsoft.AspNet.Server.IIS": "1.0.0-beta7", "Microsoft.AspNet.Server.WebListener": "1.0.0-beta7" }, "commands": { "web": "Microsoft.AspNet.Hosting --config hosting.ini" }, "frameworks": { "dnxcore50": { } }, "publishExclude": [ "node_modules", "bower_components", "**.xproj", "**.user", "**.vspscc" ], "exclude": [ "wwwroot", "node_modules", "bower_components" ] } and after that the application runs under iis express properly. Please note that in VS2015 ASP.NET 5 projects the IIS Express configuration is at <path_to_solution>\.vs\config\applicationhost.config althouhg it wasn't necessary to modify anything here as it's autogenerated folder. Also I'm not sure why you had a configuration file under wwwroot folder but that doesn't seem to be a safe place to host configuration files as it's the static folder exposed by the webserver if I'm not mistaken.