Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't deploy as a Virtual Application on Azure #211

Open
kershnerd opened this issue Dec 8, 2015 · 4 comments
Open

Can't deploy as a Virtual Application on Azure #211

kershnerd opened this issue Dec 8, 2015 · 4 comments

Comments

@kershnerd
Copy link

This has been a super frustrating experience for me.

I am trying to deploy this as a /blog virtual application on azure and nothing I am doing is working.

My main site is an default MVC application located here: http://jeffkershner.azurewebsites.net/

The /blog directory has been specified as an application in Azure.

I loaded the MiniBlog as a website and updated the web.config as shown in the readme file.

When I import the azure publish profile, I can't deploy to the site/blog as I get this error:
Can't find existing loaded project:C:\Users\Jeff\OneDrive\Projects\JeffKershner\JeffKershner.blog\

When I click the publish web icon in the Azure App Service Activity window in visual studio 2015, it seems to publish correctly. I FTP in to Azure and everything look right. But when I hit the URL:

http://jeffkershner.azurewebsites.net/blog

I get this error:
The CodeDom provider type "Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" could not be located.

I have tried a ton of ways to import that nuget package but it is just not working.

What am I missing?

@kershnerd
Copy link
Author

So it seems that the Virtual Application in Azure is still inheriting web.config settings from the application above it? When I remove the codedom stuff and ApplicationInsights from the parent application, the blog seems to work. WTF?

I followed these steps to create a sub folder as a virtual directory in Azure. Is this not correct?
http://blogs.msdn.com/b/tomholl/archive/2014/09/22/deploying-multiple-virtual-directories-to-a-single-azure-website.aspx

@bmacm
Copy link

bmacm commented Apr 25, 2017

@kershnerd did you manage to get a fix for this Jeff? I am hitting into a very similar issue hosting on Azure.

@bmacm
Copy link

bmacm commented Apr 25, 2017

For anyone else facing the same issue, removing the below from the web.config of the parent project seems to allow the child blog site to successfully start. For those interested in the downside of doing this please see this StackOverflow question

<system.codedom>
   <compilers>
      <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701" />
      <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" />
    </compilers>
</system.codedom>

@jnosek
Copy link

jnosek commented May 31, 2017

You can additionally add this to the web.config of the app in the virtual directory
<system.codedom> <compilers /> </system.codedom>
This will remove all the configured compilers for the parent app in your child app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants