TracySchreiber-2913 avatar image
0 Votes"
TracySchreiber-2913 asked XuDongPeng-MSFT commented

Problems with VS2019 ASP.NET web site project and href links


I have a problem with the url used in the href attribute for my style sheets. The website should run under a directory I will call /MyWebSite. I have added the virtual directory to my applicationhost.config so that it look like this:

See attachment

Now I can open my top page using http://localhost:50380/MyWebSite/StartPage.aspx and all the page links work.

Now, in start page I have the following tag in StartPage.aspx:

See attachment

However, the style sheet is not being loaded. Can anyone tell me how I can get this to work?

Thank You


site.txt (1.7 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @TracySchreiber-2913 , According to what you mentioned, I think the cause of the problem is related to the project structure in your IIS.This is one of the possibilities: If static files are added as virtual directories, did you not add them to the main application? If this is the case, you could refer to this case for more details.
If possible, please provide the structure of your project in IIS, which will help us find the cause of the problem and find the corresponding solution.

0 Votes 0 ·

0 Answers