Ashok kumar
Ashok kumar

Reputation: 1611

How to debug VS-2008 application which is hosted in IIS ver 5.1

I have written some JavaScript to do client-side validation. If I press F5 to execute the application, everything is working fine. But, if I host the application in IIS and if I run from IIS, JavaScript validation is not working at-all.

Can anybody tell what could be the reason?

Hence, I want to debug the application which is hosted in IIS. I am using IIS ver 5.1. How can I debug? means, what processes to attach?

Thanks in advance

Upvotes: 0

Views: 78

Answers (2)

Ashok kumar
Ashok kumar

Reputation: 1611

Attach aspnet_wp process. Now, you can debug your application hosted in IIS.

Upvotes: 0

Darin Dimitrov
Darin Dimitrov

Reputation: 1038810

You have probbaly hardcoded the url to your javascript files like this:

<script type="text/javascript" src="/scripts/test.js"></script>

When you host in IIS there is a virtual directory so the correct path is now:

<script type="text/javascript" src="/myapplicationname/scripts/test.js"></script>

So the best way is to use the following when including js files:

<script type="text/javascript" src="<%= ResolveUrl("~/scripts/test.js") %>"></script>

Upvotes: 1

Related Questions