Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

when  I upload I got an error in web conf file

Posted on 2007-11-22
6
Medium Priority
?
330 Views
Last Modified: 2009-02-07
sir,
  In local host  the project is working fine when I uploaded the project from filezilla to my host

 I am getting error in web conf file  
Parser Error Message: The value for the property 'level' is not valid. The error is: The string must be at least 1 characters long.
Line 19:   <system.web>
Line 20:     <compilation defaultLanguage="c#" />
Line 21:     <trust level="" />
Line 22:   </system.web>

 after uploading the project
 please help me in this
Line 23: </configuration>
<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.
        -->
		<httpRuntime executionTimeout="180" maxRequestLength="15192"/>
		<compilation defaultLanguage="c#" debug="true">
   <assemblies>
    <add assembly="Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
   </assemblies>
  </compilation>
		<!--
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
        -->
		<authentication mode="Windows"/>
		<customErrors mode="Off">
		</customErrors>
		<!--
            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="off" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
		<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" lockElements=" " cookieless="false" timeout="20"/>
	</system.web>

Open in new window

0
Comment
Question by:medapati
  • 2
6 Comments
 
LVL 7

Expert Comment

by:bungHoc
ID: 20333401
The problem is caused by ConfigurationElement initializes with some crappy default values.

There's a workaround for it here:
http://connect.microsoft.com/VisualStudio/feedback/Workaround.aspx?FeedbackID=94351

Hope this helps..
0
 

Author Comment

by:medapati
ID: 20333510
Can u tell me clearly I did not get  you I am getting error in web.config  file
0
 
LVL 7

Accepted Solution

by:
bungHoc earned 1000 total points
ID: 20333668
Well.. the exception was thrown because your string is totally empty and it is not valid for the validator. So.. you need to assign a valid value.
0
 
LVL 26

Assisted Solution

by:Anurag Thakur
Anurag Thakur earned 1000 total points
ID: 22585847
when i used ur system.web in my configuration file i found that lockElements does not exist in the MSDN documentation provided as a link below

<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" lockElements=" " cookieless="false" timeout="20"/>

http://msdn.microsoft.com/en-us/library/h6bb9cz9(VS.71).aspx

if its ok to add it then you should be adding some value not keeping it clear or empty because parsing and compilation will throw an error
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Integration Management Part 2
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question