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

Fixed exception thrown by SassHandler with apps on virtual directories #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fixed exception thrown by SassHandler with apps on virtual directories #4

wants to merge 1 commit into from

Conversation

ScottHamper
Copy link

When an MVC application is hosted under a virtual directory in IIS, SassHandler will throw an exception due to improperly resolving the complete system file path of a SCSS file.

For example, given:

  • My application root is C:\IIS\MyApp
  • I'm requesting ~/styles/main.scss

If I add an application to the "Default Web Site" in IIS, alias it as "my-app", and request http://localhost/my-app/styles/main.scss, then SassHandler will attempt to find the file at C:\IIS\MyApp\my-app\styles\main.scss. However, the file is actually at C:\IIS\MyApp\styles\main.scss.

Updating SassHandler to use HttpRequest.AppRelativeCurrentExecutionFilePath fixes this issue.

When an application is hosted on IIS through a virtual directory, (e.g.,
"/my-app" as the entry point instead of "/"), SassHandler will no longer
throw an exception when attempting to compile a SCSS file.
@jmalczak
Copy link

Why this is not merged? Is this project still alive?

@TBAPI-0KA
Copy link
Owner

Project is partially alive - I tried to merge with the latest libsass version, but run into significant memory leak issues, which I weren't able to resolve quickly. I hope to manage things and continue to evolve a project further.

@ashwin027
Copy link

Im running into the exact same issue. Is there a workaround until this is merged?

@gkinsman
Copy link

gkinsman commented Apr 8, 2016

@TBAPI-0KA Is it possible to merge just this change without updating to the latest libsass?

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

Successfully merging this pull request may close these issues.

5 participants