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

Miniblog won't work as IIS application #40

Open
robalexclark opened this issue Nov 18, 2017 · 14 comments
Open

Miniblog won't work as IIS application #40

robalexclark opened this issue Nov 18, 2017 · 14 comments

Comments

@robalexclark
Copy link

I've been trying to work out what is special about the miniblog.core routing/setup that stops it working as a IIS application (works fine when published to a root IIS site. Miniblog is unable to find Views and css files for example, but I'm unable to understand why ¯_(ツ)_/¯ Can anyone help/give me some pointers? Thanks.

@eddynaka
Copy link
Contributor

eddynaka commented Nov 18, 2017 via email

@eddynaka
Copy link
Contributor

ok. found the problem. i will make a pull request with that.

the css paths aren't dynamic, so it will go always to root iis website.

@robalexclark
Copy link
Author

Yes it fails at the first css it finds (which is belowthefold.css). Thanks for looking into this for me.

@eddynaka
Copy link
Contributor

Can you send me a picture?

I found other errors but I still can't reproduce yours.

@robalexclark
Copy link
Author

OK, the first error after publish is this (complaining about access to ob folder)j:

Content root path: C:\inetpub\wwwroot\MiniBlog
Now listening on: http://localhost:33208
Application started. Press Ctrl+C to shut down.
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[0]
An unhandled exception has occurred: Access to the path 'C:\inetpub\wwwroot\MiniBlog\obj\WebOptimizerCache' is denied.
System.UnauthorizedAccessException: Access to the path 'C:\inetpub\wwwroot\MiniBlog\obj\WebOptimizerCache' is denied.

Sooo, I manually created an obj directory and granted write access, but still no joy as the next error encountered is:

System.IO.FileNotFoundException: No files found matching "/MiniBlog/css/belowthefold.scss" exist in "C:\inetpub\wwwroot\MiniBlog\wwwroot"
at WebOptimizer.Asset.ExpandGlobs(IAsset asset, IHostingEnvironment env)
at WebOptimizer.Asset.GenerateCacheKey(HttpContext context)
at WebOptimizer.Taghelpers.BaseTagHelper.GenerateHash(IAsset asset)
at WebOptimizer.Taghelpers.LinkTagHelper.Process(TagHelperContext context, TagHelperOutput output)
at Microsoft.AspNetCore.Razor.TagHelpers.TagHelper.ProcessAsync(TagHelperContext context, TagHelperOutput output)
at Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.d__0.MoveNext()

@eddynaka
Copy link
Contributor

eddynaka commented Nov 18, 2017 via email

@robalexclark
Copy link
Author

I'm turning on logging in the web.config - the output is from the stout log files.

@eddynaka
Copy link
Contributor

eddynaka commented Nov 18, 2017 via email

@robalexclark
Copy link
Author

I've been using webdeploy to deploy to the IIS server, which runs dotnet publish then copies the output to the IIS application directory. This is the way I've been publishing other netcore 2.0 apps and they work fine. Whatever is stopping miniblog.core working as an IIS application must be due to the way it is setup/configured within the code.

I did however run dotnet publish and manually copy the files but the error is the same.

@iqmeta
Copy link

iqmeta commented Jul 31, 2018

same here, look to me like this one
ligershark/WebOptimizer#73
=> ~/ is might not resolved for subfolders/iis virtual apps

https://github.com/ligershark/WebOptimizer/blob/master/src/WebOptimizer.Core/Asset.cs
line 106 "/" hard root => exception => 119

@bahadirekici
Copy link

I've been using webdeploy to deploy to the IIS server, which runs dotnet publish then copies the output to the IIS application directory. This is the way I've been publishing other netcore 2.0 apps and they work fine. Whatever is stopping miniblog.core working as an IIS application must be due to the way it is setup/configured within the code.

I did however run dotnet publish and manually copy the files but the error is the same.

Did you find any solution ?

@robalexclark
Copy link
Author

Nope - I didn't. In the end I just rolled my own mini-blog engine, but now I'm in the process of moving all this to Medium.com

@bahadirekici
Copy link

This is really annoying. I'm thinking of going to back MVC.

@bahadirekici
Copy link

My error also different;

Application started. Press Ctrl+C to shut down.
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
      An unhandled exception has occurred while executing the request.
System.IO.FileNotFoundException: No files found matching "/be/js/site.js" exist in "C:\inetpub\wwwroot\be\wwwroot\"

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

4 participants