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

Running as vitrual directory in iis #20

Closed
hikalkan opened this issue Jun 6, 2014 · 6 comments
Closed

Running as vitrual directory in iis #20

hikalkan opened this issue Jun 6, 2014 · 6 comments
Assignees
Labels
Milestone

Comments

@hikalkan
Copy link
Member

hikalkan commented Jun 6, 2014

Currently, ABP samples work properly in IIS if we deploy as web site. But there may be some problems if it's deployed in a virtual directory.

@hikalkan hikalkan changed the title Running in vitrual directory in iis Running as vitrual directory in iis Jun 6, 2014
@hikalkan hikalkan added this to the ABP v0.2.3 milestone Jun 7, 2014
hikalkan added a commit that referenced this issue Jun 14, 2014
@hikalkan
Copy link
Member Author

If you want to run the application under a virtual path in IIS (not as a web site), then you should include this script to head section of your page:

<script>
var abp = abp || {};
abp.appPath = '@ApplicationPath';
</script>

This defines abp.appPath javascript variable as your virtual path. Then, ABP's javascripts use it to resolve absolute paths.

@hikalkan hikalkan self-assigned this Jun 15, 2014
@florianotf
Copy link

I'm having trouble with this issue, even after I included that piece of code to define appPath.

When I run the application hosted in IIS (using virtual directory), if I try to change localization, I get the error:

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

Requested URL http://localhost:80/AbpLocalization/ChangeCulture?cultureName=en
Physical Path C:\inetpub\wwwroot\AbpLocalization\ChangeCulture

@hikalkan
Copy link
Member Author

Hi @florianotf
Change this line in header.cshtml:

<a href="/AbpLocalization/ChangeCulture?cultureName={{language.name}}">

to this line:

<a href="~/AbpLocalization/ChangeCulture?cultureName={{language.name}}">

It should work.

@florianotf
Copy link

Hi @hikalkan!
Thanks for the fast reply!

I changed that line and now it almost works!
The request is correctly received, the cookie is saved and no error is shown.

But it doesn't return to App main page. It show IIS localhost page. (my aplication is in localhost/OMC.Web/)

Thanks again for the support ang congratulations for this excellent project.

hikalkan added a commit that referenced this issue Apr 12, 2015
@hikalkan
Copy link
Member Author

Fixed it. It will be redirect to root page in next version. For now, you can change it like:

<a href="~/AbpLocalization/ChangeCulture?cultureName={{language.name}}&returnUrl=@ApplicationPath">

@florianotf
Copy link

Now it works! Great!

Thank you!

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

No branches or pull requests

2 participants