Link to home
Start Free TrialLog in
Avatar of giitshiva
giitshivaFlag for India

asked on

Problem in deploying the web site developed in visual studio 2005 to local IIS server ?

i am using visual web developer 2005 for design and vb as script language. when i create a web site using vs2005 the project run's correctly  in debugging mode.

when i deploy it to local server and try to open the default.aspx file through browser, it so an error message in browser as shown below..

Server Error in '/ASPSER' Application.
The current identity (NT AUTHORITY\NETWORK SERVICE) does not have write access to 'D:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.


if i try the same from client machine's browser it so the error message shown below.

Server Error in '/ASPSER' Application.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>

i tryed all the three way's of deploying and i try it by creating web site as local IIS application also.
without using frame work ordinary ASP files are working properly.

here i am using

server : windows 2003 server.
IIS    : IIS 6.0 as local web server.

i don't know if there is any configuration to be done in IIS 6.0 to run aspx files.
otherwise any modification to be done in web.config file.

my application project and error page screen shot has been in the attachment as zip file.


if there's any to help me.
code of Default.aspx
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table>
            <tr>
                <td style="width: 145px">
                    Monthly investment
                </td>
                <td style="width: 165px">
                    <asp:DropDownList ID="dbMonthlyInve" runat="server" Width="120px">
                    </asp:DropDownList></td>
            </tr>
            <tr>
                <td style="width: 145px">
                    Annual Interset Rate</td>
                <td style="width: 165px">
                    <asp:TextBox ID="txtInterestRate" runat="server"></asp:TextBox></td>
            </tr>
            <tr>
                <td style="width: 145px; height: 26px">
                    Numbers of Years</td>
                <td style="width: 165px; height: 26px">
                    <asp:TextBox ID="txtYears" runat="server"></asp:TextBox></td>
            </tr>
            <tr>
                <td style="width: 145px">
                    Future Value</td>
                <td style="width: 165px">
                    <asp:Label ID="lblFutureValue" runat="server" Width="153px"></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="width: 145px">
                </td>
                <td style="width: 165px">
                </td>
            </tr>
            <tr>
                <td style="width: 145px">
                    &nbsp; &nbsp;&nbsp;<asp:Button ID="btnCalculate" runat="server" Text="Calculate"
                        Width="104px" /></td>
                <td style="width: 165px">
                    &nbsp; &nbsp; &nbsp;&nbsp;
                    <asp:Button ID="btnClear" runat="server" Height="24px" Text="Clear" Width="104px" />
                </td>
            </tr>
        </table>
        <br />
    
    </div>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Interest Rate is required" ControlToValidate="txtInterestRate" Display="Dynamic"></asp:RequiredFieldValidator>
        <asp:RangeValidator ID="RangeValidator1" runat="server" ErrorMessage="Years must range from 1 to 45"
            Width="166px" ControlToValidate="txtYears" Display="Dynamic" MaximumValue="45" MinimumValue="1" Type="Integer"></asp:RangeValidator>
        <br />
        <asp:RangeValidator ID="RangeValidator2" runat="server" ControlToValidate="txtInterestRate"
            Display="Dynamic" ErrorMessage="Interest rate must range from 1 to 20" MaximumValue="20"
            MinimumValue="1" Type="Double" Width="141px"></asp:RangeValidator>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtYears"
            Display="Dynamic" ErrorMessage="Number of year is required"></asp:RequiredFieldValidator>
    </form>
</body>
</html>
 
 
code of Default.aspx.vb
Partial Class _Default
    Inherits System.Web.UI.Page
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            Dim iIndex As Integer
            For iIndex = 50 To 500 Step 50
                dbMonthlyInve.Items.Add(iIndex)
            Next
        End If
 
    End Sub
 
    Protected Sub btnCalculate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCalculate.Click
        Dim mMonths As Integer
        Dim mInterstRate, mMonthInves, mFutureValue As Decimal
 
        If IsValid Then
            mMonths = txtYears.Text * 12
            mInterstRate = txtInterestRate.Text / 12 / 100
            mMonthInves = dbMonthlyInve.SelectedValue
            mFutureValue = FutureValue(mMonths, mInterstRate, mMonthInves)
            lblFutureValue.Text = FormatCurrency(mFutureValue)
        End If
    End Sub
 
    Private Function FutureValue(ByVal Months As Integer, _
                                  ByVal InterestRate As Decimal, _
                                  ByVal MonthlyInve As Decimal) As Decimal
        Dim mIndex As Integer
        Dim mFValue As Decimal
        For mIndex = 1 To Months
            mFValue = (mFValue + MonthlyInve) * (1 + InterestRate)
        Next
        Return mFValue
    End Function
 
    Protected Sub btnClear_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnClear.Click
        dbMonthlyInve.Text = 50
        txtInterestRate.Text = ""
        txtYears.Text = ""
        lblFutureValue.Text = ""
    End Sub
End Class
 
code of web.config
 
<?xml version="1.0"?>
<!-- 
    Note: As an alternative to hand editing this file you can use the 
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in 
    machine.config.comments usually located in 
    \Windows\Microsoft.Net\Framework\v2.x\Config 
-->
<configuration>
	<appSettings/>
	<connectionStrings/>
	<system.web>
		<!-- 
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
 
            Visual Basic options:
            Set strict="true" to disallow all data type conversions 
            where data loss can occur. 
            Set explicit="true" to force declaration of all variables.
        -->
		<compilation debug="true" strict="false" explicit="true"/>
		<pages>
			<namespaces>
				<clear/>
				<add namespace="System"/>
				<add namespace="System.Collections"/>
				<add namespace="System.Collections.Specialized"/>
				<add namespace="System.Configuration"/>
				<add namespace="System.Text"/>
				<add namespace="System.Text.RegularExpressions"/>
				<add namespace="System.Web"/>
				<add namespace="System.Web.Caching"/>
				<add namespace="System.Web.SessionState"/>
				<add namespace="System.Web.Security"/>
				<add namespace="System.Web.Profile"/>
				<add namespace="System.Web.UI"/>
				<add namespace="System.Web.UI.WebControls"/>
				<add namespace="System.Web.UI.WebControls.WebParts"/>
				<add namespace="System.Web.UI.HtmlControls"/>
			</namespaces>
		</pages>
		<!--
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
        -->
		<authentication mode="Windows"/>
		<!--
            The <customErrors> section enables configuration 
            of what to do if/when an unhandled error occurs 
            during the execution of a request. Specifically, 
            it enables developers to configure html error pages 
            to be displayed in place of a error stack trace.
 
        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>       
        -->
 
            
     <anonymousIdentification enabled="true" />
             
    
	</system.web>
</configuration>

Open in new window

Avatar of b_levitt
b_levitt

Start with this part of the error:
"Server Error in '/ASPSER' Application.
The current identity (NT AUTHORITY\NETWORK SERVICE) does not have write access to 'D:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.
"

Browse to that folder and make sure the network service account has write permission.
Avatar of giitshiva

ASKER

yes the  'D:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'. this folder is set to read only. when tryed to change it attribute to not read only, it itself again set tot Read only attribute. i don't know where to change to write property.

the error page of the browser has been attached
error-Server.JPG
error-Client.JPG
ASKER CERTIFIED SOLUTION
Avatar of b_levitt
b_levitt

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial