Home Dashboard Directory Help
Search

New WebForm app - login crashes - no owin.Environment by Jim Mead


Status: 

Closed
 as Fixed Help for as Fixed


8
0
Sign in
to vote
Type: Bug
ID: 792583
Opened: 7/4/2013 8:38:15 AM
Access Restriction: Public
0
Workaround(s)
view
7
User(s) can reproduce this bug

Description

Fresh install of VS 2013,
then fresh install of ASP.NET and Web Tools 2013 Preview Refresh.

Create new C# Web app, select Web Forms, default authentication,
No change to app created by template.
App runs until trying log in page.
Log in page throws exception Account\OpenAuthProviders.ascx.cs line 35
No owin.Environment item was found in context.
Details
Sign in to post a comment.
Posted by Microsoft on 8/21/2013 at 6:21 PM
Thank you for your feedback. The issue is fixed in the next release of Visual Studio 2013.

-Web development tools team
Posted by Tratcher on 8/15/2013 at 11:48 AM
Woops, that should be <add key="owin:AppStartup" value="[Namespace].Startup, [AssemblyName]" />
Posted by Tratcher on 8/15/2013 at 11:47 AM
Most likely it cannot find the OWIN Startup class. The default convention for the Startup class is [AssemblyName].Startup. If you're no longer following that convention you'll need to specify the full name of your Startup class in the Web.Config.
<appSettings>
    <add key="owin:AppStartup" value="[AssemblyName].Startup, [AssemblyName]" />
</appSettings>

The upcoming RC1 Microsoft.Owin.Host.SystemWeb package now throws detailed exception messages when the Startup class cannot be found.
Posted by graycrow on 8/14/2013 at 1:01 AM
It's even worse - to reproduce the bug you just need to change original namespace. New namespace doesn't matter, should just be different.
Posted by graycrow on 7/29/2013 at 7:33 AM
I can reproduce this bug with MVC5 project by changing namespace to one which contains dots. For example WebApplication1 works, Company.ABC.WebApplication1 doesn't.
Posted by Wraith-Lunati on 7/25/2013 at 12:25 PM
I found the culprit, it seems that if you create the project with spaces in the name, the Owin context gets confused. ex, "My Web Application" vs "MyWebApplication. First one will fail, second one works.
Posted by Wraith-Lunati on 7/6/2013 at 9:54 AM
I can produce this error using Web Forms in VB as well, throws the same exception.
Posted by Microsoft on 7/4/2013 at 8:50 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
File Name Submitted By Submitted On File Size  
UploadSummary-130704153815.xml (restricted) 7/4/2013 -
VsInfo.xml (restricted) 7/4/2013 -
DxDiagOutput.txt (restricted) 7/4/2013 -
SolutionFingerprint.8256.xml (restricted) 7/4/2013 -