-2

This is the asp.NET webapp which i need to get after publishing from visual studio

But after hosting the webapp in IIS server and when i browse i get the localhost like this

  • 1) Learn how to format your question in a good shape. 2) Disable directory browsing. 3) Set a proper default page or default route for `/`. – Lex Li Oct 02 '22 at 17:24
  • Hi, has your problem been solved? – YurongDai Oct 04 '22 at 06:23
  • IIS webserver hosting part was solved.But now after migrating to azure I got another error.I can login to the webapp.But cannot fetch the data.There is some error while fetching the database – divya k nair Oct 04 '22 at 06:34

1 Answers1

0

Open IIS Manager,Click on your site, under IIS there is an icon labeled "Directory Browsing".Double-click it, then click Disable under Actions. Or disable directory browsing by pasting the following in web.config:

<system.webServer>
  <directoryBrowse enabled="false" />
</system.webServer>

Then you need to set SignUp.aspx as default document, refer to the following steps:

  1. In IIS Manager, click the server name node, and then scroll to locate the Default Document icon.
  2. Double click Default Document.
  3. In the Actions pane, click Add.
  4. In the Add Default Document dialog box, type SignUp.aspx.
  5. Click OK.
YurongDai
  • 1,362
  • 1
  • 2
  • 7