0

I am using VS2012, A website on local machine works fine , when i deploy a website on remote PC / Server , it also works fine when you run on localhost in server computer, then problem arises when you access it remotely having static/live IP. it gives following configuration error.

enter image description here

deployed in following path

inetpub > wwwroot > PSE

I have also deployed a website in inetpub > wwwroot > POS which works fine

here is the website structure

enter image description here

Here is the only one web.config file in root directory

<?xml version="1.0"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
  <system.web>
    <customErrors mode="Off"/>
    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="MySql.Data, Version=6.9.6.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/>
      </assemblies>
    </compilation>
    <httpRuntime targetFramework="4.0"/>
    <authentication mode="Forms">
      <forms defaultUrl="~/dao/pos.aspx" loginUrl="~/default.aspx" timeout="20" slidingExpiration="true"></forms>
    </authentication>
  </system.web>
</configuration>

Please guide me, where i am wrong and why i am getting above error.

here is IIS Configuration enter image description here

Khuram Jan
  • 79
  • 1
  • 4
  • 16
  • 1
    It would be useful for you to obtain the actual error that is causing the problem. I see that you have `customErrors` set to off, but that you aren't getting the error information. Follow the solution in the following article, which will actually allow you to see the error and (presumably) point you in the right direction: http://stackoverflow.com/questions/101693/customerrors-mode-off – Martin Jun 13 '15 at 10:07
  • We need more information, this is a generic error. Do you have access to this server to browse locally? Or just set off custom errors for a few seconds http://stackoverflow.com/questions/101693/customerrors-mode-off – Marc Cals Jun 13 '15 at 10:08
  • 1
    It not affect you error, but Remove `debug="true"` from compilation tag, it could affect performance of your production website – Marc Cals Jun 13 '15 at 10:09
  • i have followed instructions given in above link i-e , now i get the following additional information about error. **It is an error to use a section registered as allowDefinition='MachineOnly' beyond machine.config. (C:\inetpub\wwwroot\pce\web.config line 18)** – Khuram Jan Jun 13 '15 at 10:20
  • Do you have access to machine.config of your server? – Marc Cals Jun 13 '15 at 10:34
  • Yes i can access through Remote Desktop – Khuram Jan Jun 13 '15 at 10:44

1 Answers1

0

Your error messages says that this is possibly caused by not configuring a virtual directory as an application. Have you checked this in IIS manager?

Look in the example below to see the difference between a application and a virtual directory that is not an application:

enter image description here

To convert a virtual directory to an application, right click and choose convert to application

DanL
  • 1,974
  • 14
  • 13
  • i have also created a Virtual Directory by right click on Web Application and added Virtual directory, then converted it into Application, still i am seeing above error meesgae – Khuram Jan Jun 13 '15 at 10:32
  • Can you post a screen shot of what appears in your IIS manager like the image I have shared above please? – DanL Jun 13 '15 at 10:34
  • Yes added IIS snapshot on my original question above. – Khuram Jan Jun 13 '15 at 10:43
  • Your IIS config says it's running on port 8083 but your screnshot with error says 8091. Is this the correct server? – DanL Jun 13 '15 at 10:47
  • Yes i have also another website **POS** having **Port 8081** run great on **Static IP:8091** – Khuram Jan Jun 13 '15 at 10:52
  • The iis manager screen shot only shows the setup for the website running on port 8083, however you are getting an error when accessing the website on port 8091. Can you show use the iis manager setup for the website on port 8091 please. – DanL Jun 13 '15 at 10:54
  • I haven't any idea about this setup because our Administrator did these settings, I have changed port **8083** to **8091** , still getting the same error, – Khuram Jan Jun 13 '15 at 11:03