A
A
Alexander2016-01-19 13:15:58
ASP.NET
Alexander, 2016-01-19 13:15:58

How to make XMLFile.xml open instead of Default.aspx by default?

The site project, the Default.aspx page was created in it, which opens in the browser at 127.0.0.1:8080/opt. The goal is to also open XMLFile.xml from this directory (127.0.0.1:8080/opt/XMLFile.xml). In other words, it is required that xml opens not at 127.0.0.1:8080/opt/XMLFile.xml, but at
127.0.0.1:8080/opt/ Thanks in advance for your replies/
Topic closed, found a solution: Add the following to the web.config file:

<urlMappings enabled="true">
      <add url="~/opt/out/" mappedUrl="~/s/opt/out/XMLFile.xml"/>
</urlMappings>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2016-01-19
@mazart

Add the following to the web.config file:

<urlMappings enabled="true">
      <add url="~/opt/out/" mappedUrl="~/s/opt/out/XMLFile.xml"/>
</urlMappings>

V
V Sh., 2016-01-19
@JuniorNoobie

in visual studio, right click on the XMLFile.xml page and something like "set as start page".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question