Saturday, March 31, 2012

web components dissappearing

I have run into a problem where I work with a Web Form for a while and get it almost good to go only to find during a test that something has gone wrong (via an exception displayed in the browser). I return to the IDE and find that the web components have been removed from my form. Do you know what causes this problems and how I can avoid it? This has happened a few times and I am force to recreate my form. This only effects my presentation. Any help is appreciated.

Thanks,I've seen some strange behaviour, but this isn't one of them.

web conferencing application

I would like to build a web conferencing application but need a place to start. If anyone has any links for some documentation, please let me know. Thanks!

You really cant accomplish this under the standard ASP.NET model. ASP.NET is connectionless (actually most things that run through the browser are) -

An avenue I've explorered for getting this done at one point was Flash. It has built in features for streaming, persistant connections, video, and full motion...etc.

Another way would be to tie into the WMP codec's and write a server side listening service, and an ActiveX control that could get this done.

Probably the way I'd get started would be to work on getting chat / video input from a single user and updating a server in realtime, then find a way to make that information available to a distributed system somehow that you could invite other users into.


I was thinking somehow I could tie into RDP that would update a web service with AJAX.. I have already developed the chat feature using AJAX. Its not perfect but works with multiple users.

presenter logs into website and installs activeX control for RDP. The webpage feeds video through RDP to the webservice that feeds the other clients

The only problem is the documentation that I have found so far is very limited. Do you think this is possible?

Web Config

Is there a way to write to the web.config file during the execution of the
application?Hi Claudio

The web.config file is a standard XML file so you should be able to
write to it by accessing it using the classes of the System.Xml
namespace. However, AFAIK none of the built-in configuration classes
provide you with direct write-access to the application configuration file.

I'd rather recommend you to store settings that need read/write access
in a dedicated configuration file. A simple library that I've written
ages ago (and still using in all my projects) can be found here
(contains the source plus a sample project):

http://www.evolvesoftware.ch/downlo...nfiguration.zip

hth, Philipp

Claudio wrote:

> Is there a way to write to the web.config file during the execution of the
> application?
Claudio wrote:
> Is there a way to write to the web.config file during the execution
> of the application?

It's possible.
I wrote an example to modify the list of users that are allowed access:
http://www.codeproject.com/aspnet/members.asp

But don't forget that any change to web.config causes the
web application to restart. All users lose their session state.

--

Jos Branders

Web Config

I'm getting errors when I run my application with the following in my web
config file.
<httpHandlers>
<add verb="*" path="*.vb"
type="System.Web.HttpNotFoundHandler,System.Web" />
<add verb="*" path="*.cs"
type="System.Web.HttpNotFoundHandler,System.Web" />
<add verb="*" path="*.vbproj"
type="System.Web.HttpNotFoundHandler,System.Web" />
<add verb="*" path="*.csproj"
type="System.Web.HttpNotFoundHandler,System.Web" />
<add verb="*" path="*.webinfo"
type="System.Web.HttpNotFoundHandler,System.Web" />
</httpHandlers>and the error?
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Mike Moore" <MikeMoore@.discussions.microsoft.com> wrote in message
news:87EFF9FE-06F8-4EAB-A1D6-3B0D544199DC@.microsoft.com...
> I'm getting errors when I run my application with the following in my web
> config file.
> <httpHandlers>
> <add verb="*" path="*.vb"
> type="System.Web.HttpNotFoundHandler,System.Web" />
> <add verb="*" path="*.cs"
> type="System.Web.HttpNotFoundHandler,System.Web" />
> <add verb="*" path="*.vbproj"
> type="System.Web.HttpNotFoundHandler,System.Web" />
> <add verb="*" path="*.csproj"
> type="System.Web.HttpNotFoundHandler,System.Web" />
> <add verb="*" path="*.webinfo"
> type="System.Web.HttpNotFoundHandler,System.Web" />
> </httpHandlers>
My guess is that since System.Web.dll is located in the GAC (global assembly
cache) it requires the full assembly name which might be:
System.Web.HttpNotFoundHandler,System.Web,Version=1.0.3705.0,Culture=neutral
,PublicKeyToken=b03f5f7f11d50a3a
However, I don't think there's any need to map those extensions to it
anymore..I think as of 1.0 those extensions are automatically mapped...could
be wrong about all of this though.
Karl
MY ASP.Net tutorials
http://www.openmymind.net/
"Mike Moore" <MikeMoore@.discussions.microsoft.com> wrote in message
news:87EFF9FE-06F8-4EAB-A1D6-3B0D544199DC@.microsoft.com...
> I'm getting errors when I run my application with the following in my web
> config file.
> <httpHandlers>
> <add verb="*" path="*.vb"
> type="System.Web.HttpNotFoundHandler,System.Web" />
> <add verb="*" path="*.cs"
> type="System.Web.HttpNotFoundHandler,System.Web" />
> <add verb="*" path="*.vbproj"
> type="System.Web.HttpNotFoundHandler,System.Web" />
> <add verb="*" path="*.csproj"
> type="System.Web.HttpNotFoundHandler,System.Web" />
> <add verb="*" path="*.webinfo"
> type="System.Web.HttpNotFoundHandler,System.Web" />
> </httpHandlers>
Configuration Error
Description: An error occurred during the processing of a configuration file
required to service this request. Please review the specific error details
below and modify your configuration file appropriately.
Parser Error Message: File or assembly name System.Web, or one of its
dependencies, was not found.
Source Error:
Line 74:
Line 75: <httpHandlers>
Line 76: <add verb="*" path ="*.vb"
type="System.Web.HttpNotFoundHandler,System.Web" />
Line 77: <add verb="*" path ="*.cs"
type="System.Web.HttpNotFoundHandler,System.Web" />
Line 78: <add verb="*" path ="*.vbproj"
type="System.Web.HttpNotFoundHandler,System.Web" />
"Curt_C [MVP]" wrote:

> and the error?
> --
> Curt Christianson
> Site & Scripts: http://www.Darkfalz.com
> Blog: http://blog.Darkfalz.com
>
> "Mike Moore" <MikeMoore@.discussions.microsoft.com> wrote in message
> news:87EFF9FE-06F8-4EAB-A1D6-3B0D544199DC@.microsoft.com...
>
>
Description: An error occurred during the processing of a configuration file
required to service this request. Please review the specific error details
below and modify your configuration file appropriately.
Parser Error Message: File or assembly name System.Web, or one of its
dependencies, was not found.
Source Error:
Line 74:
Line 75: <httpHandlers>
Line 76: <add verb="*" path ="*.vb"
type="System.Web.HttpNotFoundHandler,System.Web" />
Line 77: <add verb="*" path ="*.cs"
type="System.Web.HttpNotFoundHandler,System.Web" />
Line 78: <add verb="*" path ="*.vbproj"
type="System.Web.HttpNotFoundHandler,System.Web" />
"Curt_C [MVP]" wrote:

> and the error?
> --
> Curt Christianson
> Site & Scripts: http://www.Darkfalz.com
> Blog: http://blog.Darkfalz.com
>
> "Mike Moore" <MikeMoore@.discussions.microsoft.com> wrote in message
> news:87EFF9FE-06F8-4EAB-A1D6-3B0D544199DC@.microsoft.com...
>
>
Could it be because all of those handlers
are already configured in machine.config as
System.Web.HttpForbiddenHandler
( not as System.Web.HttpNotFoundHandler... )
?
Juan T. Llibre
ASP.NET MVP
===========
"Mike Moore" <MikeMoore@.discussions.microsoft.com> wrote in message
news:CF6E6FB9-0AF5-4D73-8BE6-9D85FCE64351@.microsoft.com...
> Configuration Error
> Description: An error occurred during the processing of a configuration
> file
> required to service this request. Please review the specific error details
> below and modify your configuration file appropriately.
> Parser Error Message: File or assembly name System.Web, or one of its
> dependencies, was not found.
> Source Error:
>
> Line 74:
> Line 75: <httpHandlers>
> Line 76: <add verb="*" path ="*.vb"
> type="System.Web.HttpNotFoundHandler,System.Web" />
> Line 77: <add verb="*" path ="*.cs"
> type="System.Web.HttpNotFoundHandler,System.Web" />
> Line 78: <add verb="*" path ="*.vbproj"
> type="System.Web.HttpNotFoundHandler,System.Web" />
>
> "Curt_C [MVP]" wrote:
>

web config

Hi,
I'm trying to setup the Web Config file so that the connection string is
read from it but I'm not sure what I'm doing wrong. The error I get is:
The ConnectionString property has not been initialized.
I also tried to create a virtual path but that didn't work.
My application is at c:\inetpub\wwwroot\web This is where the web.config
file is and it contains the following:
<appSettings>
<add key="connectionstring" value="server=(local)
;trusted_connection=true;database=xxx"/>
</appSettings>
The aspx file contains:
<%@dotnet.itags.org. Page Language="VB" %>
<script runat="server">
Function GetData() As System.Data.IDataReader
Dim connectionString As String
connectionString = ConfigurationSettings.AppSettings
("ConnectionString")
Dim dbConnection As System.Data.IDbConnection = New
System.Data.SqlClient.SqlConnection(connectionString)
Dim queryString As String = "SELECT [tblLink].[quote], [tbllink]
.[linkURL"& _
"] FROM [tblink]"
Dim dbCommand As System.Data.IDbCommand = New
System.Data.SqlClient.SqlCommand
dbCommand.CommandText = queryString
dbCommand.Connection = dbConnection
dbConnection.Open
Dim dataReader As System.Data.IDataReader =
dbCommand.ExecuteReader(System.Data.CommandBehavior.CloseConnection)
Return dataReader
End Function
Sub Page_Load(sender As Object, e As EventArgs)
Page.Databind()
End Sub
</script>
Thanks
Message posted via http://www.webservertalk.com"connectionstring" and "ConnectionString" are not the same. Change the line-
connectionString=ConfigurationSettings.AppSettings("ConnectionString")
to
connectionString=ConfigurationSettings.AppSettings("connectionstring")
"Joe via webservertalk.com" <forum@.webservertalk.com> wrote in message
news:086ed6be9bd842dbabf1aa433aa7fdf3@.Do
webservertalk.com...
> Hi,
> I'm trying to setup the Web Config file so that the connection string is
> read from it but I'm not sure what I'm doing wrong. The error I get is:
> The ConnectionString property has not been initialized.
> I also tried to create a virtual path but that didn't work.
> My application is at c:\inetpub\wwwroot\web This is where the web.config
> file is and it contains the following:
> <appSettings>
> <add key="connectionstring" value="server=(local)
> ;trusted_connection=true;database=xxx"/>
> </appSettings>
>
> The aspx file contains:
> <%@. Page Language="VB" %>
> <script runat="server">
> Function GetData() As System.Data.IDataReader
> Dim connectionString As String
> connectionString = ConfigurationSettings.AppSettings
> ("ConnectionString")
> Dim dbConnection As System.Data.IDbConnection = New
> System.Data.SqlClient.SqlConnection(connectionString)
> Dim queryString As String = "SELECT [tblLink].[quote],
[tbllink]
> .[linkURL"& _
> "] FROM [tblink]"
> Dim dbCommand As System.Data.IDbCommand = New
> System.Data.SqlClient.SqlCommand
> dbCommand.CommandText = queryString
> dbCommand.Connection = dbConnection
> dbConnection.Open
> Dim dataReader As System.Data.IDataReader =
> dbCommand.ExecuteReader(System.Data.CommandBehavior.CloseConnection)
> Return dataReader
> End Function
> Sub Page_Load(sender As Object, e As EventArgs)
> Page.Databind()
> End Sub
> </script>
>
> Thanks
> --
> Message posted via http://www.webservertalk.com
Thanks. I changed it but I still get the error message that:
The ConnectionString property has not been initialized.
Message posted via http://www.webservertalk.com
JOe how can u get ConnectionString property error
when u said u have changed it!
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!
I fixed the names so that I tried to make sure it was case sensitive. I've
been going through the code but still can't seem to see what's wrong. I
renamed the connection string, so I have in the Web config:
<appSettings>
<add key="ConnectionString1" value="server=(local)
;trusted_connection=true;database=xx"/>
</appSettings>
aspx file:
Function GetLessons() As System.Data.IDataReader
Dim strConnection As String
strConnection = ConfigurationSettings.AppSettings
("ConnectionString1")
Dim dbConnection As System.Data.IDbConnection = New
System.Data.SqlClient.SqlConnection(strConnection)
Dim queryString As String = "SELECT [tblLesson].* FROM
[tblLesson]"
Dim dbCommand As System.Data.IDbCommand = New
System.Data.SqlClient.SqlCommand
dbCommand.CommandText = queryString
dbCommand.Connection = dbConnection
dbConnection.Open
Dim dataReader As System.Data.IDataReader =
dbCommand.ExecuteReader(System.Data.CommandBehavior.CloseConnection)
Return dataReader
End Function
Sub Page_Load(sender As Object, e As EventArgs)
Page.Databind()
End Sub
</script>
<html>
<head>
</head>
<body>
<form runat="server">
<asp:DataGrid id="DataGrid1" runat="server" DataSource="<%#
GetLessons() %>"></asp:DataGrid>
</form>
</body>
</html>
Thanks again
Message posted via http://www.webservertalk.com
Joe,
why are you using Data Provider syntax
for a simple data connection ?
System.Data.IDataReader, System.Data.IDbConnection,
and System.Data.IDbConnection all are used when
implementing your own Data Provider.
Please review
http://msdn.microsoft.com/library/d...connections.asp
to see the info you need to implement a data connection
using any of the Data Providers built into .NET.
Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaol
Ven, y hablemos de ASP.NET...
======================
"Joe via webservertalk.com" <forum@.webservertalk.com> wrote in message
news:00ad191e3d8f47f6a6ba782e53ddcb5e@.Do
webservertalk.com...
>I fixed the names so that I tried to make sure it was case sensitive. I've
> been going through the code but still can't seem to see what's wrong. I
> renamed the connection string, so I have in the Web config:
> <appSettings>
> <add key="ConnectionString1" value="server=(local)
> ;trusted_connection=true;database=xx"/>
> </appSettings>
> aspx file:
> Function GetLessons() As System.Data.IDataReader
> Dim strConnection As String
> strConnection = ConfigurationSettings.AppSettings
> ("ConnectionString1")
> Dim dbConnection As System.Data.IDbConnection = New
> System.Data.SqlClient.SqlConnection(strConnection)
> Dim queryString As String = "SELECT [tblLesson].* FROM
> [tblLesson]"
> Dim dbCommand As System.Data.IDbCommand = New
> System.Data.SqlClient.SqlCommand
> dbCommand.CommandText = queryString
> dbCommand.Connection = dbConnection
> dbConnection.Open
> Dim dataReader As System.Data.IDataReader =
> dbCommand.ExecuteReader(System.Data.CommandBehavior.CloseConnection)
> Return dataReader
> End Function
>
> Sub Page_Load(sender As Object, e As EventArgs)
> Page.Databind()
> End Sub
> </script>
> <html>
> <head>
> </head>
> <body>
> <form runat="server">
> <asp:DataGrid id="DataGrid1" runat="server" DataSource="<%#
> GetLessons() %>"></asp:DataGrid>
> </form>
> </body>
> </html>
> Thanks again
Hi,
I think what's happening is that it's not seeing the web.config file since
I tried removing it and got the same error message.
I have the application at: c:/inetpub/wwwroot/web
The web.config file is in this directory and so is the aspx file that I am
testing. I created a virtual directory to this.
Am I missing anything in making this my application root?
Thanks again
Message posted via http://www.webservertalk.com
Thanks for all the help. I got it working. It was the case-sensitivity
issue. Also thanks for the advice on the data provider.
Message posted via http://www.webservertalk.com
Hello Juan,
I disagree with this statement. While these interfaces can be used when impl
ementing
your own data provider, they provide a very nice abstraction layer.
Let's say that I want to interact with either an Oracle or an MSSQL database
in my application, depending on my client's requirements. The quickest/easie
st
way to accomplish this is to return an IDbConnection or IDataReader out of
my class's methods. The calling code has no idea about the underlying datast
ore
and new databases can be added by simply adding a new class.
Very good design...
Matt Berther
http://www.mattberther.com
> Joe,
> why are you using Data Provider syntax
> for a simple data connection ?
> System.Data.IDataReader, System.Data.IDbConnection, and
> System.Data.IDbConnection all are used when implementing your own Data
> Provider.
> Please review
> http://msdn.microsoft.com/library/d...ary/en-us/cpgui
> de/html/cpconadonetconnections.asp
> to see the info you need to implement a data connection
> using any of the Data Providers built into .NET.
> Juan T. Llibre
> ASP.NET MVP
> http://asp.net.do/foros/
> Foros de ASP.NET en Espaol
> Ven, y hablemos de ASP.NET...
> ======================
> "Joe via webservertalk.com" <forum@.webservertalk.com> wrote in message
> news:00ad191e3d8f47f6a6ba782e53ddcb5e@.Do
webservertalk.com...
>
In general, yes, but the added level of complexity
may cause troubleshooting problems which don't
crop up with the simpler data connection methods.
Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaol
Ven, y hablemos de ASP.NET...
======================
"Matt Berther" <mberther@.hotmail.com> wrote in message
news:221a09c78550fb8c6ecc5d1d2e129@.news.microsoft.com...
> Hello Juan,
> I disagree with this statement. While these interfaces can be used when
> implementing your own data provider, they provide a very nice abstraction
> layer.
> Let's say that I want to interact with either an Oracle or an MSSQL
> database in my application, depending on my client's requirements. The
> quickest/easiest way to accomplish this is to return an IDbConnection or
> IDataReader out of my class's methods. The calling code has no idea about
> the underlying datastore and new databases can be added by simply adding a
> new class.
> Very good design...
> --
> Matt Berther
> http://www.mattberther.com
>
>
>

Web Config

Is there a way to write to the web.config file during the execution of the
application?Hi Claudio
The web.config file is a standard XML file so you should be able to
write to it by accessing it using the classes of the System.Xml
namespace. However, AFAIK none of the built-in configuration classes
provide you with direct write-access to the application configuration file.
I'd rather recommend you to store settings that need read/write access
in a dedicated configuration file. A simple library that I've written
ages ago (and still using in all my projects) can be found here
(contains the source plus a sample project):
www.evolvesoftware.ch/download/file...nfiguration.zip
hth, Philipp
Claudio wrote:

> Is there a way to write to the web.config file during the execution of the
> application?
>
Claudio wrote:
> Is there a way to write to the web.config file during the execution
> of the application?
It's possible.
I wrote an example to modify the list of users that are allowed access:
http://www.codeproject.com/aspnet/members.asp
But don't forget that any change to web.config causes the
web application to restart. All users lose their session state.
Jos Branders

Web Config

I'm getting errors when I run my application with the following in my web
config file.

<httpHandlers>
<add verb="*" path="*.vb"
type="System.Web.HttpNotFoundHandler,System.Web" />
<add verb="*" path="*.cs"
type="System.Web.HttpNotFoundHandler,System.Web" />
<add verb="*" path="*.vbproj"
type="System.Web.HttpNotFoundHandler,System.Web" />
<add verb="*" path="*.csproj"
type="System.Web.HttpNotFoundHandler,System.Web" />
<add verb="*" path="*.webinfo"
type="System.Web.HttpNotFoundHandler,System.Web" />
</httpHandlers>and the error?

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com

"Mike Moore" <MikeMoore@.discussions.microsoft.com> wrote in message
news:87EFF9FE-06F8-4EAB-A1D6-3B0D544199DC@.microsoft.com...
> I'm getting errors when I run my application with the following in my web
> config file.
> <httpHandlers>
> <add verb="*" path="*.vb"
> type="System.Web.HttpNotFoundHandler,System.Web" />
> <add verb="*" path="*.cs"
> type="System.Web.HttpNotFoundHandler,System.Web" />
> <add verb="*" path="*.vbproj"
> type="System.Web.HttpNotFoundHandler,System.Web" />
> <add verb="*" path="*.csproj"
> type="System.Web.HttpNotFoundHandler,System.Web" />
> <add verb="*" path="*.webinfo"
> type="System.Web.HttpNotFoundHandler,System.Web" />
> </httpHandlers
My guess is that since System.Web.dll is located in the GAC (global assembly
cache) it requires the full assembly name which might be:
System.Web.HttpNotFoundHandler,System.Web,Version= 1.0.3705.0,Culture=neutral
,PublicKeyToken=b03f5f7f11d50a3a

However, I don't think there's any need to map those extensions to it
anymore..I think as of 1.0 those extensions are automatically mapped...could
be wrong about all of this though.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/

"Mike Moore" <MikeMoore@.discussions.microsoft.com> wrote in message
news:87EFF9FE-06F8-4EAB-A1D6-3B0D544199DC@.microsoft.com...
> I'm getting errors when I run my application with the following in my web
> config file.
> <httpHandlers>
> <add verb="*" path="*.vb"
> type="System.Web.HttpNotFoundHandler,System.Web" />
> <add verb="*" path="*.cs"
> type="System.Web.HttpNotFoundHandler,System.Web" />
> <add verb="*" path="*.vbproj"
> type="System.Web.HttpNotFoundHandler,System.Web" />
> <add verb="*" path="*.csproj"
> type="System.Web.HttpNotFoundHandler,System.Web" />
> <add verb="*" path="*.webinfo"
> type="System.Web.HttpNotFoundHandler,System.Web" />
> </httpHandlers
Configuration Error
Description: An error occurred during the processing of a configuration file
required to service this request. Please review the specific error details
below and modify your configuration file appropriately.

Parser Error Message: File or assembly name System.Web, or one of its
dependencies, was not found.

Source Error:

Line 74:
Line 75: <httpHandlers>
Line 76: <add verb="*" path ="*.vb"
type="System.Web.HttpNotFoundHandler,System.Web" />
Line 77: <add verb="*" path ="*.cs"
type="System.Web.HttpNotFoundHandler,System.Web" />
Line 78: <add verb="*" path ="*.vbproj"
type="System.Web.HttpNotFoundHandler,System.Web" /
"Curt_C [MVP]" wrote:

> and the error?
> --
> Curt Christianson
> Site & Scripts: http://www.Darkfalz.com
> Blog: http://blog.Darkfalz.com
>
> "Mike Moore" <MikeMoore@.discussions.microsoft.com> wrote in message
> news:87EFF9FE-06F8-4EAB-A1D6-3B0D544199DC@.microsoft.com...
> > I'm getting errors when I run my application with the following in my web
> > config file.
> > <httpHandlers>
> > <add verb="*" path="*.vb"
> > type="System.Web.HttpNotFoundHandler,System.Web" />
> > <add verb="*" path="*.cs"
> > type="System.Web.HttpNotFoundHandler,System.Web" />
> > <add verb="*" path="*.vbproj"
> > type="System.Web.HttpNotFoundHandler,System.Web" />
> > <add verb="*" path="*.csproj"
> > type="System.Web.HttpNotFoundHandler,System.Web" />
> > <add verb="*" path="*.webinfo"
> > type="System.Web.HttpNotFoundHandler,System.Web" />
> > </httpHandlers>
>
Description: An error occurred during the processing of a configuration file
required to service this request. Please review the specific error details
below and modify your configuration file appropriately.

Parser Error Message: File or assembly name System.Web, or one of its
dependencies, was not found.

Source Error:

Line 74:
Line 75: <httpHandlers>
Line 76: <add verb="*" path ="*.vb"
type="System.Web.HttpNotFoundHandler,System.Web" />
Line 77: <add verb="*" path ="*.cs"
type="System.Web.HttpNotFoundHandler,System.Web" />
Line 78: <add verb="*" path ="*.vbproj"
type="System.Web.HttpNotFoundHandler,System.Web" /
"Curt_C [MVP]" wrote:

> and the error?
> --
> Curt Christianson
> Site & Scripts: http://www.Darkfalz.com
> Blog: http://blog.Darkfalz.com
>
> "Mike Moore" <MikeMoore@.discussions.microsoft.com> wrote in message
> news:87EFF9FE-06F8-4EAB-A1D6-3B0D544199DC@.microsoft.com...
> > I'm getting errors when I run my application with the following in my web
> > config file.
> > <httpHandlers>
> > <add verb="*" path="*.vb"
> > type="System.Web.HttpNotFoundHandler,System.Web" />
> > <add verb="*" path="*.cs"
> > type="System.Web.HttpNotFoundHandler,System.Web" />
> > <add verb="*" path="*.vbproj"
> > type="System.Web.HttpNotFoundHandler,System.Web" />
> > <add verb="*" path="*.csproj"
> > type="System.Web.HttpNotFoundHandler,System.Web" />
> > <add verb="*" path="*.webinfo"
> > type="System.Web.HttpNotFoundHandler,System.Web" />
> > </httpHandlers>
>
Could it be because all of those handlers
are already configured in machine.config as
System.Web.HttpForbiddenHandler
( not as System.Web.HttpNotFoundHandler... )

?

Juan T. Llibre
ASP.NET MVP
===========
"Mike Moore" <MikeMoore@.discussions.microsoft.com> wrote in message
news:CF6E6FB9-0AF5-4D73-8BE6-9D85FCE64351@.microsoft.com...
> Configuration Error
> Description: An error occurred during the processing of a configuration
> file
> required to service this request. Please review the specific error details
> below and modify your configuration file appropriately.
> Parser Error Message: File or assembly name System.Web, or one of its
> dependencies, was not found.
> Source Error:
>
> Line 74:
> Line 75: <httpHandlers>
> Line 76: <add verb="*" path ="*.vb"
> type="System.Web.HttpNotFoundHandler,System.Web" />
> Line 77: <add verb="*" path ="*.cs"
> type="System.Web.HttpNotFoundHandler,System.Web" />
> Line 78: <add verb="*" path ="*.vbproj"
> type="System.Web.HttpNotFoundHandler,System.Web" />
>
> "Curt_C [MVP]" wrote:
>> and the error?
>>
>> --
>> Curt Christianson
>> Site & Scripts: http://www.Darkfalz.com
>> Blog: http://blog.Darkfalz.com
>>
>>
>> "Mike Moore" <MikeMoore@.discussions.microsoft.com> wrote in message
>> news:87EFF9FE-06F8-4EAB-A1D6-3B0D544199DC@.microsoft.com...
>> > I'm getting errors when I run my application with the following in my
>> > web
>> > config file.
>>> > <httpHandlers>
>> > <add verb="*" path="*.vb"
>> > type="System.Web.HttpNotFoundHandler,System.Web" />
>> > <add verb="*" path="*.cs"
>> > type="System.Web.HttpNotFoundHandler,System.Web" />
>> > <add verb="*" path="*.vbproj"
>> > type="System.Web.HttpNotFoundHandler,System.Web" />
>> > <add verb="*" path="*.csproj"
>> > type="System.Web.HttpNotFoundHandler,System.Web" />
>> > <add verb="*" path="*.webinfo"
>> > type="System.Web.HttpNotFoundHandler,System.Web" />
>> > </httpHandlers>
>>
>>
>

web config

Hi,

I'm trying to setup the Web Config file so that the connection string is
read from it but I'm not sure what I'm doing wrong. The error I get is:
The ConnectionString property has not been initialized.
I also tried to create a virtual path but that didn't work.
My application is at c:\inetpub\wwwroot\web This is where the web.config
file is and it contains the following:

<appSettings>
<add key="connectionstring" value="server=(local)
;trusted_connection=true;database=xxx"/>
</appSettings
The aspx file contains:

<%@dotnet.itags.org. Page Language="VB" %>
<script runat="server">
Function GetData() As System.Data.IDataReader
Dim connectionString As String
connectionString = ConfigurationSettings.AppSettings
("ConnectionString")

Dim dbConnection As System.Data.IDbConnection = New
System.Data.SqlClient.SqlConnection(connectionStri ng)

Dim queryString As String = "SELECT [tblLink].[quote], [tbllink]
..[linkURL"& _
"] FROM [tblink]"
Dim dbCommand As System.Data.IDbCommand = New
System.Data.SqlClient.SqlCommand
dbCommand.CommandText = queryString
dbCommand.Connection = dbConnection

dbConnection.Open
Dim dataReader As System.Data.IDataReader =
dbCommand.ExecuteReader(System.Data.CommandBehavio r.CloseConnection)

Return dataReader
End Function

Sub Page_Load(sender As Object, e As EventArgs)
Page.Databind()
End Sub

</script
Thanks

--
Message posted via http://www.dotnetmonster.com"connectionstring" and "ConnectionString" are not the same. Change the line-
connectionString=ConfigurationSettings.AppSettings ("ConnectionString")
to
connectionString=ConfigurationSettings.AppSettings ("connectionstring")

"Joe via DotNetMonster.com" <forum@.DotNetMonster.com> wrote in message
news:086ed6be9bd842dbabf1aa433aa7fdf3@.DotNetMonste r.com...
> Hi,
> I'm trying to setup the Web Config file so that the connection string is
> read from it but I'm not sure what I'm doing wrong. The error I get is:
> The ConnectionString property has not been initialized.
> I also tried to create a virtual path but that didn't work.
> My application is at c:\inetpub\wwwroot\web This is where the web.config
> file is and it contains the following:
> <appSettings>
> <add key="connectionstring" value="server=(local)
> ;trusted_connection=true;database=xxx"/>
> </appSettings>
>
> The aspx file contains:
> <%@. Page Language="VB" %>
> <script runat="server">
> Function GetData() As System.Data.IDataReader
> Dim connectionString As String
> connectionString = ConfigurationSettings.AppSettings
> ("ConnectionString")
> Dim dbConnection As System.Data.IDbConnection = New
> System.Data.SqlClient.SqlConnection(connectionStri ng)
> Dim queryString As String = "SELECT [tblLink].[quote],
[tbllink]
> .[linkURL"& _
> "] FROM [tblink]"
> Dim dbCommand As System.Data.IDbCommand = New
> System.Data.SqlClient.SqlCommand
> dbCommand.CommandText = queryString
> dbCommand.Connection = dbConnection
> dbConnection.Open
> Dim dataReader As System.Data.IDataReader =
> dbCommand.ExecuteReader(System.Data.CommandBehavio r.CloseConnection)
> Return dataReader
> End Function
> Sub Page_Load(sender As Object, e As EventArgs)
> Page.Databind()
> End Sub
> </script>
>
> Thanks
> --
> Message posted via http://www.dotnetmonster.com
Thanks. I changed it but I still get the error message that:

The ConnectionString property has not been initialized.

--
Message posted via http://www.dotnetmonster.com
JOe how can u get ConnectionString property error
when u said u have changed it!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
I fixed the names so that I tried to make sure it was case sensitive. I've
been going through the code but still can't seem to see what's wrong. I
renamed the connection string, so I have in the Web config:

<appSettings>
<add key="ConnectionString1" value="server=(local)
;trusted_connection=true;database=xx"/>
</appSettings
aspx file:
Function GetLessons() As System.Data.IDataReader
Dim strConnection As String
strConnection = ConfigurationSettings.AppSettings
("ConnectionString1")
Dim dbConnection As System.Data.IDbConnection = New
System.Data.SqlClient.SqlConnection(strConnection)

Dim queryString As String = "SELECT [tblLesson].* FROM
[tblLesson]"
Dim dbCommand As System.Data.IDbCommand = New
System.Data.SqlClient.SqlCommand
dbCommand.CommandText = queryString
dbCommand.Connection = dbConnection

dbConnection.Open
Dim dataReader As System.Data.IDataReader =
dbCommand.ExecuteReader(System.Data.CommandBehavio r.CloseConnection)

Return dataReader
End Function

Sub Page_Load(sender As Object, e As EventArgs)
Page.Databind()
End Sub

</script>
<html>
<head>
</head>
<body>
<form runat="server">
<asp:DataGrid id="DataGrid1" runat="server" DataSource="<%#
GetLessons() %>"></asp:DataGrid>
</form>
</body>
</html
Thanks again

--
Message posted via http://www.dotnetmonster.com
Joe,

why are you using Data Provider syntax
for a simple data connection ?

System.Data.IDataReader, System.Data.IDbConnection,
and System.Data.IDbConnection all are used when
implementing your own Data Provider.

Please review
http://msdn.microsoft.com/library/d...connections.asp
to see the info you need to implement a data connection
using any of the Data Providers built into .NET.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaol
Ven, y hablemos de ASP.NET...
======================

"Joe via DotNetMonster.com" <forum@.DotNetMonster.com> wrote in message
news:00ad191e3d8f47f6a6ba782e53ddcb5e@.DotNetMonste r.com...
>I fixed the names so that I tried to make sure it was case sensitive. I've
> been going through the code but still can't seem to see what's wrong. I
> renamed the connection string, so I have in the Web config:
> <appSettings>
> <add key="ConnectionString1" value="server=(local)
> ;trusted_connection=true;database=xx"/>
> </appSettings>
> aspx file:
> Function GetLessons() As System.Data.IDataReader
> Dim strConnection As String
> strConnection = ConfigurationSettings.AppSettings
> ("ConnectionString1")
> Dim dbConnection As System.Data.IDbConnection = New
> System.Data.SqlClient.SqlConnection(strConnection)
> Dim queryString As String = "SELECT [tblLesson].* FROM
> [tblLesson]"
> Dim dbCommand As System.Data.IDbCommand = New
> System.Data.SqlClient.SqlCommand
> dbCommand.CommandText = queryString
> dbCommand.Connection = dbConnection
> dbConnection.Open
> Dim dataReader As System.Data.IDataReader =
> dbCommand.ExecuteReader(System.Data.CommandBehavio r.CloseConnection)
> Return dataReader
> End Function
>
> Sub Page_Load(sender As Object, e As EventArgs)
> Page.Databind()
> End Sub
> </script>
> <html>
> <head>
> </head>
> <body>
> <form runat="server">
> <asp:DataGrid id="DataGrid1" runat="server" DataSource="<%#
> GetLessons() %>"></asp:DataGrid>
> </form>
> </body>
> </html>
> Thanks again
Hi,

I think what's happening is that it's not seeing the web.config file since
I tried removing it and got the same error message.

I have the application at: c:/inetpub/wwwroot/web
The web.config file is in this directory and so is the aspx file that I am
testing. I created a virtual directory to this.

Am I missing anything in making this my application root?

Thanks again

--
Message posted via http://www.dotnetmonster.com
Thanks for all the help. I got it working. It was the case-sensitivity
issue. Also thanks for the advice on the data provider.

--
Message posted via http://www.dotnetmonster.com
Hello Juan,

I disagree with this statement. While these interfaces can be used when implementing
your own data provider, they provide a very nice abstraction layer.

Let's say that I want to interact with either an Oracle or an MSSQL database
in my application, depending on my client's requirements. The quickest/easiest
way to accomplish this is to return an IDbConnection or IDataReader out of
my class's methods. The calling code has no idea about the underlying datastore
and new databases can be added by simply adding a new class.

Very good design...

--
Matt Berther
http://www.mattberther.com

> Joe,
> why are you using Data Provider syntax
> for a simple data connection ?
> System.Data.IDataReader, System.Data.IDbConnection, and
> System.Data.IDbConnection all are used when implementing your own Data
> Provider.
> Please review
> http://msdn.microsoft.com/library/d...ary/en-us/cpgui
> de/html/cpconadonetconnections.asp
> to see the info you need to implement a data connection
> using any of the Data Providers built into .NET.
> Juan T. Llibre
> ASP.NET MVP
> http://asp.net.do/foros/
> Foros de ASP.NET en Espaol
> Ven, y hablemos de ASP.NET...
> ======================
> "Joe via DotNetMonster.com" <forum@.DotNetMonster.com> wrote in message
> news:00ad191e3d8f47f6a6ba782e53ddcb5e@.DotNetMonste r.com...
>> I fixed the names so that I tried to make sure it was case sensitive.
>> I've been going through the code but still can't seem to see what's
>> wrong. I renamed the connection string, so I have in the Web config:
>>
>> <appSettings>
>> <add key="ConnectionString1" value="server=(local)
>> ;trusted_connection=true;database=xx"/>
>> </appSettings>
>> aspx file:
>> Function GetLessons() As System.Data.IDataReader
>> Dim strConnection As String
>> strConnection = ConfigurationSettings.AppSettings
>> ("ConnectionString1")
>> Dim dbConnection As System.Data.IDbConnection = New
>> System.Data.SqlClient.SqlConnection(strConnection)
>> Dim queryString As String = "SELECT [tblLesson].* FROM
>> [tblLesson]"
>> Dim dbCommand As System.Data.IDbCommand = New
>> System.Data.SqlClient.SqlCommand
>> dbCommand.CommandText = queryString
>> dbCommand.Connection = dbConnection
>> dbConnection.Open
>> Dim dataReader As System.Data.IDataReader =
>> dbCommand.ExecuteReader(System.Data.CommandBehavio r.CloseConnection)
>> Return dataReader
>> End Function
>> Sub Page_Load(sender As Object, e As EventArgs)
>> Page.Databind()
>> End Sub
>> </script>
>> <html>
>> <head>
>> </head>
>> <body>
>> <form runat="server">
>> <asp:DataGrid id="DataGrid1" runat="server" DataSource="<%#
>> GetLessons() %>"></asp:DataGrid>
>> </form>
>> </body>
>> </html>
>> Thanks again
>
In general, yes, but the added level of complexity
may cause troubleshooting problems which don't
crop up with the simpler data connection methods.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaol
Ven, y hablemos de ASP.NET...
======================

"Matt Berther" <mberther@.hotmail.com> wrote in message
news:221a09c78550fb8c6ecc5d1d2e129@.news.microsoft. com...
> Hello Juan,
> I disagree with this statement. While these interfaces can be used when
> implementing your own data provider, they provide a very nice abstraction
> layer.
> Let's say that I want to interact with either an Oracle or an MSSQL
> database in my application, depending on my client's requirements. The
> quickest/easiest way to accomplish this is to return an IDbConnection or
> IDataReader out of my class's methods. The calling code has no idea about
> the underlying datastore and new databases can be added by simply adding a
> new class.
> Very good design...
> --
> Matt Berther
> http://www.mattberther.com
>> Joe,
>>
>> why are you using Data Provider syntax
>> for a simple data connection ?
>> System.Data.IDataReader, System.Data.IDbConnection, and
>> System.Data.IDbConnection all are used when implementing your own Data
>> Provider.
>>
>> Please review
>>
>> http://msdn.microsoft.com/library/d...ary/en-us/cpgui
>> de/html/cpconadonetconnections.asp
>>
>> to see the info you need to implement a data connection
>> using any of the Data Providers built into .NET.
>>
>> Juan T. Llibre
>> ASP.NET MVP
>> http://asp.net.do/foros/
>> Foros de ASP.NET en Espaol
>> Ven, y hablemos de ASP.NET...
>> ======================
>> "Joe via DotNetMonster.com" <forum@.DotNetMonster.com> wrote in message
>> news:00ad191e3d8f47f6a6ba782e53ddcb5e@.DotNetMonste r.com...
>>
>>> I fixed the names so that I tried to make sure it was case sensitive.
>>> I've been going through the code but still can't seem to see what's
>>> wrong. I renamed the connection string, so I have in the Web config:
>>>
>>> <appSettings>
>>> <add key="ConnectionString1" value="server=(local)
>>> ;trusted_connection=true;database=xx"/>
>>> </appSettings>
>>> aspx file:
>>> Function GetLessons() As System.Data.IDataReader
>>> Dim strConnection As String
>>> strConnection = ConfigurationSettings.AppSettings
>>> ("ConnectionString1")
>>> Dim dbConnection As System.Data.IDbConnection = New
>>> System.Data.SqlClient.SqlConnection(strConnection)
>>> Dim queryString As String = "SELECT [tblLesson].* FROM
>>> [tblLesson]"
>>> Dim dbCommand As System.Data.IDbCommand = New
>>> System.Data.SqlClient.SqlCommand
>>> dbCommand.CommandText = queryString
>>> dbCommand.Connection = dbConnection
>>> dbConnection.Open
>>> Dim dataReader As System.Data.IDataReader =
>>> dbCommand.ExecuteReader(System.Data.CommandBehavio r.CloseConnection)
>>> Return dataReader
>>> End Function
>>> Sub Page_Load(sender As Object, e As EventArgs)
>>> Page.Databind()
>>> End Sub
>>> </script>
>>> <html>
>>> <head>
>>> </head>
>>> <body>
>>> <form runat="server">
>>> <asp:DataGrid id="DataGrid1" runat="server" DataSource="<%#
>>> GetLessons() %>"></asp:DataGrid>
>>> </form>
>>> </body>
>>> </html>
>>> Thanks again
>>>
Glad you got this solved. From first look, I thought you didn't import the
System.Configuration Namespace. I didn't see it anywere in your code. The
fully namespace with class name is
System.Configuration.ConfigurationSettings.AppSett ings. But, look like this
wasn't it. Just wanted to give others a heads up on this. People sometimes
forget this when not using VS.NET to compile their code.

"Joe via DotNetMonster.com" <forum@.DotNetMonster.com> wrote in message
news:086ed6be9bd842dbabf1aa433aa7fdf3@.DotNetMonste r.com...
> Hi,
> I'm trying to setup the Web Config file so that the connection string is
> read from it but I'm not sure what I'm doing wrong. The error I get is:
> The ConnectionString property has not been initialized.
> I also tried to create a virtual path but that didn't work.
> My application is at c:\inetpub\wwwroot\web This is where the web.config
> file is and it contains the following:
> <appSettings>
> <add key="connectionstring" value="server=(local)
> ;trusted_connection=true;database=xxx"/>
> </appSettings>
>
> The aspx file contains:
> <%@. Page Language="VB" %>
> <script runat="server">
> Function GetData() As System.Data.IDataReader
> Dim connectionString As String
> connectionString = ConfigurationSettings.AppSettings
> ("ConnectionString")
> Dim dbConnection As System.Data.IDbConnection = New
> System.Data.SqlClient.SqlConnection(connectionStri ng)
> Dim queryString As String = "SELECT [tblLink].[quote],
> [tbllink]
> .[linkURL"& _
> "] FROM [tblink]"
> Dim dbCommand As System.Data.IDbCommand = New
> System.Data.SqlClient.SqlCommand
> dbCommand.CommandText = queryString
> dbCommand.Connection = dbConnection
> dbConnection.Open
> Dim dataReader As System.Data.IDataReader =
> dbCommand.ExecuteReader(System.Data.CommandBehavio r.CloseConnection)
> Return dataReader
> End Function
> Sub Page_Load(sender As Object, e As EventArgs)
> Page.Databind()
> End Sub
> </script>
>
> Thanks
> --
> Message posted via http://www.dotnetmonster.com

Web Config ?

Hi there,
I'm using VWD 2005 express, win xp pro sp2
I created a website with login.aspx page (not from the template)
Integrated with Access database, Also I modify the web.config file
everything work fine I put response.redirect to the log in with user session
like I said everything work fine
Now I also have Microsoft Visio htm file on my website with hyper link to
the default.aspx page
Every time when I click from Visio file to the main page the login.aspx poup
It's not happend from the others *-.aspx pages
How do I setup a filter in web.config that will exclude these pages
(Visio.htm)
Thanks,
Oded DrorHey Oded,
You need to create a separate <location> section where you can allow
anonymous users:
<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
<location path="Visio.htm">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
</system.web>
Ken
Microsoft MVP [ASP.NET]
"Oded Dror" <odeddror@.cox.net> wrote in message
news:e87p7EbKGHA.1236@.TK2MSFTNGP10.phx.gbl...
> Hi there,
> I'm using VWD 2005 express, win xp pro sp2
> I created a website with login.aspx page (not from the template)
> Integrated with Access database, Also I modify the web.config file
> everything work fine I put response.redirect to the log in with user
> session
> like I said everything work fine
> Now I also have Microsoft Visio htm file on my website with hyper link to
> the default.aspx page
> Every time when I click from Visio file to the main page the login.aspx
> poup
> It's not happend from the others *-.aspx pages
> How do I setup a filter in web.config that will exclude these pages
> (Visio.htm)
> Thanks,
> Oded Dror
>

Web Config ?

Hi there,

I'm using VWD 2005 express, win xp pro sp2
I created a website with login.aspx page (not from the template)
Integrated with Access database, Also I modify the web.config file
everything work fine I put response.redirect to the log in with user session
like I said everything work fine
Now I also have Microsoft Visio htm file on my website with hyper link to
the default.aspx page
Every time when I click from visio file to the main page the login.aspx poup
It's not happend from the others *-.aspx pages
How do I setup a filter in web.config that will exclude these pages
(Visio.htm)

Thanks,

Oded DrorHey Oded,

You need to create a separate <location> section where you can allow
anonymous users:

<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
<location path="Visio.htm">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
</system.web
Ken
Microsoft MVP [ASP.NET]

"Oded Dror" <odeddror@.cox.net> wrote in message
news:e87p7EbKGHA.1236@.TK2MSFTNGP10.phx.gbl...
> Hi there,
> I'm using VWD 2005 express, win xp pro sp2
> I created a website with login.aspx page (not from the template)
> Integrated with Access database, Also I modify the web.config file
> everything work fine I put response.redirect to the log in with user
> session
> like I said everything work fine
> Now I also have Microsoft Visio htm file on my website with hyper link to
> the default.aspx page
> Every time when I click from visio file to the main page the login.aspx
> poup
> It's not happend from the others *-.aspx pages
> How do I setup a filter in web.config that will exclude these pages
> (Visio.htm)
> Thanks,
> Oded Dror

Web Config : why no pop windows

I am building a web application using VS 2005 , .net 2.0 framework..

Why I am not seeing any pop up windows from where I can pick the options. All I am seeing is !-- , ![CDATA , ?

Anyone knows why ?

If you have used the built-in web admin tool (launched via the WebSite->ASP.NET Configuration menu item in VS 2005), it adds the xmlns namespace to the root <configuration> element and it stops the intellisense to work. Just remove the xmlns attribute and your intellisense will start working.

Your web.config should start like this,without the xmlns attribute on configuration element

<?xml version="1.0"?>
<configuration>
...............
</configuration>

Thanks

-Mark post(s) as "Answer" that helped you

Web Config <appSettings>

Hi, dear

Is it possible to add a key with value containing the concatenation of two words?
I'm trying to add a encripted password but the password has a the character Chr(34) (").
How can I solve this problem?

Thank you very much

ObedeObede,

What about replacing the double quote with some other character that is acceptable within <appSettings> but won't be found in the encrypted password. You could then use a regular expression to replace the character with the double quote when you read the setting.

For instance, if you replaced the double quote with a colon:


<appSettings>
<add key="test" value="abxq:asdfttt"></add>
</appSettings>

And then when you read the value, replace the colon with a double quote:

Dim actualPassword = Regex.Replace(ConfigurationSettings.AppSettings("test"), ":", """")

HTH,

cjmaxey
Hi, cjmaxey

I just tried it.
I want to know if there is another solution.
Thank you very much.

Obede
Place this caharcter refernce “ in XML file instead of ".

Web config

have a web app where one page Default.aspx should be publicly accessable and
another Admin.aspx restricted to a certain local group. When I am on
Default.aspx. There is link which suppose to take me Admin.aspx but I want
too give security to that page and always it jumps me to Login.aspx page.
How can I do that.

How can I do this in a web.config? Can I specify different authorization
settings per file?On Sep 28, 8:20 am, bobby <bo...@.discussions.microsoft.comwrote:

Quote:

Originally Posted by

have a web app where one page Default.aspx should be publicly accessable and
another Admin.aspx restricted to a certain local group. When I am on
Default.aspx. There is link which suppose to take me Admin.aspx but I want
too give security to that page and always it jumps me to Login.aspx page.
How can I do that.
>
How can I do this in a web.config? Can I specify different authorization
settings per file?


Hi Bobby

You can add these settings to you web.config:

<system.web>
<authentication mode="Forms">
<forms loginUrl="Login.aspx" />
</authentication>
</system.web>

<location path="Admin.aspx">
<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
</location>

If you need different settings for other files then you can add more
<locationsettings.

It's also possible to do the same thing using code, with something
like:

If Not User.IsInRole("Administrators") Then
Response.Redirect("Login.aspx")
End If

Chris

web config asp,net applications and web services.

Hi.
Can somebody tell me if changes made to the web.config file of a running
asp.net web application cause the application to be re-started.
The specific change I had in made was a change to the <trace> element of the
web.config file.
I am under the impression that this does re-start the asp.net web
application.
also would an identical change the the web.config file of an asp.net web
service cause the web service to be re-started?
thank you for your time..
cheers
martinHi Martin,
ANY change to web.config causes the app to be restarted which affects both
Web Forms and Web Services.
Generally this should not be a problem, unless you're keeping some sort of
state on the server. If you're worried about Session objects you might try
StateServer for more persistent state storage.
+++ Rick --
Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
--
Making waves on the Web
"Martin" <martin@.hotmail.com> wrote in message
news:ewPufXtREHA.3988@.tk2msftngp13.phx.gbl...
> Hi.
> Can somebody tell me if changes made to the web.config file of a running
> asp.net web application cause the application to be re-started.
> The specific change I had in made was a change to the <trace> element of
the
> web.config file.
> I am under the impression that this does re-start the asp.net web
> application.
>
> also would an identical change the the web.config file of an asp.net web
> service cause the web service to be re-started?
>
> thank you for your time..
> cheers
> martin
>
>

if you do any change to the web.config then the corresponding
application will immediately load the web.config file, but do not
restart.
the asp.net framework cashes all the settings of this file and
automatically detects and loads the settings when some modifications are
made to it, hense again takes them to the cache.
regads
raheel
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!
Rick,
Thanks a lot for the answer..
cheers
martin.
"Rick Strahl [MVP]" <rickstrahl@.hotmail.com> wrote in message
news:%23hnyattREHA.1644@.TK2MSFTNGP09.phx.gbl...
> Hi Martin,
> ANY change to web.config causes the app to be restarted which affects both
> Web Forms and Web Services.
> Generally this should not be a problem, unless you're keeping some sort of
> state on the server. If you're worried about Session objects you might try
> StateServer for more persistent state storage.
> +++ Rick --
> --
> Rick Strahl
> West Wind Technologies
> http://www.west-wind.com/
> http://www.west-wind.com/weblog/
> --
> Making waves on the Web
>
> "Martin" <martin@.hotmail.com> wrote in message
> news:ewPufXtREHA.3988@.tk2msftngp13.phx.gbl...
running
> the
>
Raheel,
This is not correct. A change to web.config causes the AppDomain of the
running application to be unloaded and a new AppDomain to be loaded with
ASP.Net runtime in it. Note that it's the AppDomain that the runtime is
hosted in (one for each virtual directory) that gets restarted not the
process.
The old AppDomain finishes running out requests while a new one is started
up to capture all new incoming requests so there may be two simultaneous
instances of the same application running for a short period of time.
+++ Rick --
Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
--
Making waves on the Web
"Raheel Hussain" <raheelphp@.yahoo.com> wrote in message
news:u$qyGDuREHA.3016@.tk2msftngp13.phx.gbl...
>
> if you do any change to the web.config then the corresponding
> application will immediately load the web.config file, but do not
> restart.
> the asp.net framework cashes all the settings of this file and
> automatically detects and loads the settings when some modifications are
> made to it, hense again takes them to the cache.
>
> regads
> raheel
>
>
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!
Dear Rick.
Yes, infact you are right.
thx for the correction.
raheel.
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!

web config asp,net applications and web services.

Hi.

Can somebody tell me if changes made to the web.config file of a running
asp.net web application cause the application to be re-started.

The specific change I had in made was a change to the <trace> element of the
web.config file.

I am under the impression that this does re-start the asp.net web
application.

also would an identical change the the web.config file of an asp.net web
service cause the web service to be re-started?

thank you for your time..

cheers

martinHi Martin,

ANY change to web.config causes the app to be restarted which affects both
Web Forms and Web Services.

Generally this should not be a problem, unless you're keeping some sort of
state on the server. If you're worried about Session objects you might try
StateServer for more persistent state storage.

+++ Rick --

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
-----------
Making waves on the Web

"Martin" <martin@.hotmail.com> wrote in message
news:ewPufXtREHA.3988@.tk2msftngp13.phx.gbl...
> Hi.
> Can somebody tell me if changes made to the web.config file of a running
> asp.net web application cause the application to be re-started.
> The specific change I had in made was a change to the <trace> element of
the
> web.config file.
> I am under the impression that this does re-start the asp.net web
> application.
>
> also would an identical change the the web.config file of an asp.net web
> service cause the web service to be re-started?
>
> thank you for your time..
> cheers
> martin
Rick,

Thanks a lot for the answer..

cheers

martin.

"Rick Strahl [MVP]" <rickstrahl@.hotmail.com> wrote in message
news:%23hnyattREHA.1644@.TK2MSFTNGP09.phx.gbl...
> Hi Martin,
> ANY change to web.config causes the app to be restarted which affects both
> Web Forms and Web Services.
> Generally this should not be a problem, unless you're keeping some sort of
> state on the server. If you're worried about Session objects you might try
> StateServer for more persistent state storage.
> +++ Rick --
> --
> Rick Strahl
> West Wind Technologies
> http://www.west-wind.com/
> http://www.west-wind.com/weblog/
> -----------
> Making waves on the Web
>
> "Martin" <martin@.hotmail.com> wrote in message
> news:ewPufXtREHA.3988@.tk2msftngp13.phx.gbl...
> > Hi.
> > Can somebody tell me if changes made to the web.config file of a
running
> > asp.net web application cause the application to be re-started.
> > The specific change I had in made was a change to the <trace> element of
> the
> > web.config file.
> > I am under the impression that this does re-start the asp.net web
> > application.
> > also would an identical change the the web.config file of an asp.net web
> > service cause the web service to be re-started?
> > thank you for your time..
> > cheers
> > martin

if you do any change to the web.config then the corresponding
application will immediately load the web.config file, but do not
restart.

the asp.net framework cashes all the settings of this file and
automatically detects and loads the settings when some modifications are
made to it, hense again takes them to the cache.

regads
raheel

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Raheel,

This is not correct. A change to web.config causes the AppDomain of the
running application to be unloaded and a new AppDomain to be loaded with
ASP.Net runtime in it. Note that it's the AppDomain that the runtime is
hosted in (one for each virtual directory) that gets restarted not the
process.

The old AppDomain finishes running out requests while a new one is started
up to capture all new incoming requests so there may be two simultaneous
instances of the same application running for a short period of time.

+++ Rick --

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
-----------
Making waves on the Web

"Raheel Hussain" <raheelphp@.yahoo.com> wrote in message
news:u$qyGDuREHA.3016@.tk2msftngp13.phx.gbl...
>
> if you do any change to the web.config then the corresponding
> application will immediately load the web.config file, but do not
> restart.
> the asp.net framework cashes all the settings of this file and
> automatically detects and loads the settings when some modifications are
> made to it, hense again takes them to the cache.
>
> regads
> raheel
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!
Dear Rick.

Yes, infact you are right.

thx for the correction.

raheel.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Web Config and query string parameters

Hi there,
I have to pass a query string parameter in my Web Config for loading a URL.
We have two environments (production and devlopment) and MonitorURL needs to
be changed when the deployment is done. In production this variable will be
http://servername:8080/MONITOR?quer...sd&query2=adsas
In this we need to get two strings by parsing the variable. But when I try
to give this variable I get a run time error. Is there any work around to
accomplish this. In development I have only one variable (there is no need t
o
split the string)
and that also is failing.
Thanks
JohnAt what point in your process are you getting an error? Retrieving the
variable from config? Parsing the variable? What is your error?
"johnpremi" <johnpremi@.discussions.microsoft.com> wrote in message
news:E4641EB8-36E3-425D-A27E-D810F75590C8@.microsoft.com...
> Hi there,
> I have to pass a query string parameter in my Web Config for loading a
> URL.
> We have two environments (production and devlopment) and MonitorURL needs
> to
> be changed when the deployment is done. In production this variable will
> be
> http://servername:8080/MONITOR?quer...sd&query2=adsas
> In this we need to get two strings by parsing the variable. But when I try
> to give this variable I get a run time error. Is there any work around to
> accomplish this. In development I have only one variable (there is no need
> to
> split the string)
> and that also is failing.
> Thanks
> John
>

Web Config and query string parameters

Hi there,
I have to pass a query string parameter in my Web Config for loading a URL.
We have two environments (production and devlopment) and MonitorURL needs to
be changed when the deployment is done. In production this variable will be
http://servername:8080/MONITOR?quer...sd&query2=adsas
In this we need to get two strings by parsing the variable. But when I try
to give this variable I get a run time error. Is there any work around to
accomplish this. In development I have only one variable (there is no need to
split the string)
and that also is failing.

Thanks
JohnAt what point in your process are you getting an error? Retrieving the
variable from config? Parsing the variable? What is your error?

"johnpremi" <johnpremi@.discussions.microsoft.com> wrote in message
news:E4641EB8-36E3-425D-A27E-D810F75590C8@.microsoft.com...
> Hi there,
> I have to pass a query string parameter in my Web Config for loading a
> URL.
> We have two environments (production and devlopment) and MonitorURL needs
> to
> be changed when the deployment is done. In production this variable will
> be
> http://servername:8080/MONITOR?quer...sd&query2=adsas
> In this we need to get two strings by parsing the variable. But when I try
> to give this variable I get a run time error. Is there any work around to
> accomplish this. In development I have only one variable (there is no need
> to
> split the string)
> and that also is failing.
> Thanks
> John

Web Config conflict?

I have 2 ASP.NET (C#) applications (A and B) running on the same
server (IIS6, but the problems is also present in IIS5).
Each application has its own Web.Config file. The only difference
between the web config files is the following
<system.web>
<httpHandlers>
<add verb="GET" path="cachedimageservice.axd"
type="MsdnMag.CachedImageService,DynamicImage" />
</httpHandlers>
</system.web>
When I run application A, which does not contain the above handler, I
get an error: "File or assembly name DynamicImage, or one of its
dependencies, was not found."
It is as if the handler declaration is machine wide and not limited to
application B. What is going on?
Finally, if I add the DynamicImage.dll to application A's bin
directory the error goes away... Application A does NOT make use of
this dll
Any clues?application a must have a reference to the dll. when the page is compiled
(first hit) the compiler will need the dll to complete the compile.
-- bruce (sqlwork.com)
"Alberto" <albertoconti@.gmail.com> wrote in message
news:7062a4c9.0412021418.6e40ad84@.posting.google.com...
| I have 2 ASP.NET (C#) applications (A and B) running on the same
| server (IIS6, but the problems is also present in IIS5).
|
| Each application has its own Web.Config file. The only difference
| between the web config files is the following
|
| <system.web>
| <httpHandlers>
| <add verb="GET" path="cachedimageservice.axd"
| type="MsdnMag.CachedImageService,DynamicImage" />
| </httpHandlers>
| </system.web>
|
| When I run application A, which does not contain the above handler, I
| get an error: "File or assembly name DynamicImage, or one of its
| dependencies, was not found."
|
| It is as if the handler declaration is machine wide and not limited to
| application B. What is going on?
|
| Finally, if I add the DynamicImage.dll to application A's bin
| directory the error goes away... Application A does NOT make use of
| this dll
|
| Any clues?
Check to see if Application A's directory is declared,
in IIS, as an IIS Virtual Directory or as an IIS Application.
Also, if you could post what the physical
directory structure looks like, it would help
pin down the problem.
Is it:
/root/A/B
or
/root/B/A
or
/root
/A
/B
i.e., is either B or A a subdirectory of the other one,
or are both subdirectories of the root directory ?
Juan T. Llibre
===========
"Alberto" <albertoconti@.gmail.com> wrote in message
news:7062a4c9.0412021418.6e40ad84@.posting.google.com...
> I have 2 ASP.NET (C#) applications (A and B) running on the same
> server (IIS6, but the problems is also present in IIS5).
> Each application has its own Web.Config file. The only difference
> between the web config files is the following
> <system.web>
> <httpHandlers>
> <add verb="GET" path="cachedimageservice.axd"
> type="MsdnMag.CachedImageService,DynamicImage" />
> </httpHandlers>
> </system.web>
> When I run application A, which does not contain the above handler, I
> get an error: "File or assembly name DynamicImage, or one of its
> dependencies, was not found."
> It is as if the handler declaration is machine wide and not limited to
> application B. What is going on?
> Finally, if I add the DynamicImage.dll to application A's bin
> directory the error goes away... Application A does NOT make use of
> this dll
> Any clues?
"Alberto" <albertoconti@.gmail.com> wrote in message
news:7062a4c9.0412021418.6e40ad84@.posting.google.com...
>I have 2 ASP.NET (C#) applications (A and B) running on the same
> server (IIS6, but the problems is also present in IIS5).
> Each application has its own Web.Config file. The only difference
> between the web config files is the following
> <system.web>
> <httpHandlers>
> <add verb="GET" path="cachedimageservice.axd"
> type="MsdnMag.CachedImageService,DynamicImage" />
> </httpHandlers>
> </system.web>
> When I run application A, which does not contain the above handler, I
> get an error: "File or assembly name DynamicImage, or one of its
> dependencies, was not found."
> It is as if the handler declaration is machine wide and not limited to
> application B. What is going on?
> Finally, if I add the DynamicImage.dll to application A's bin
> directory the error goes away... Application A does NOT make use of
> this dll
> Any clues?
"Alberto" <albertoconti@.gmail.com> wrote in message
news:7062a4c9.0412021418.6e40ad84@.posting.google.com...
>I have 2 ASP.NET (C#) applications (A and B) running on the same
> server (IIS6, but the problems is also present in IIS5).
> Each application has its own Web.Config file. The only difference
> between the web config files is the following
> <system.web>
> <httpHandlers>
> <add verb="GET" path="cachedimageservice.axd"
> type="MsdnMag.CachedImageService,DynamicImage" />
> </httpHandlers>
> </system.web>
> When I run application A, which does not contain the above handler, I
> get an error: "File or assembly name DynamicImage, or one of its
> dependencies, was not found."
> It is as if the handler declaration is machine wide and not limited to
> application B. What is going on?
> Finally, if I add the DynamicImage.dll to application A's bin
> directory the error goes away... Application A does NOT make use of
> this dll
> Any clues?
Is Application A under application B virtually? If so, then this is a known
bug, and you've already found the workaround - put the DLL into the bin
folder of application A. You can then use <remove> in the application A
web.config to get rid of the handler.
John Saunders
Thanks for your replies, but I think I am still really puzzled.
The structure of the dir is
/root
/A
/B
and neither A not B are virtual directories. So how can this happen?
"Alberto" <albertoconti@.gmail.com> wrote in message
news:7062a4c9.0412030636.b114179@.posting.google.com...
> Thanks for your replies, but I think I am still really puzzled.
> The structure of the dir is
> /root
> /A
> /B
> and neither A not B are virtual directories. So how can this happen?
I'm not sure I understand your structure. Are you saying that you've got,
say: http://site/ then http://site/A/ and http://site/B/ ? If so, then the
scenario I described should only happen if the web.config in the root had
the HttpHandler in it.
John Saunders
What's happening is that neither of your
config files in A *or* B are executing.
If you make A an IIS virtual directory,
the web.config in /A will execute.
If you make B an IIS virtual directory,
the web.config in /B will execute.
Right now, both A and B are running either off of the
web.config in /root, if there is one, or off of machine.config.
Try either...and let us know.
Juan T. Llibre
===========
"Alberto" <albertoconti@.gmail.com> wrote in message
news:7062a4c9.0412030636.b114179@.posting.google.com...
> Thanks for your replies, but I think I am still really puzzled.
> The structure of the dir is
> /root
> /A
> /B
> and neither A not B are virtual directories. So how can this happen?
I think I have solved the problem...
As I mentioned I had 2 applications A and B. However, application A
was the default application when you reached http://site -->
http://site/A. Application B was reachable from a link in application
A or from http://B
Looking at IIS Manager at http://site one sees A and B as a virtual
directory under it... so apparently I was wrong!
In any case, I did the following which solved the problem.
I added a file default.aspx at http://site which contains a simple
<%Response.Redirect("A")%>. Each application then has its own
webconfig file.
Is this the best way to do this?
Thanks
Alberto
"Juan T. Llibre [MVP]" <nomailreplies@.nowhere.com> wrote in message news:<eKG73RV2EHA.1300@.TK2MS
FTNGP14.phx.gbl>...
> What's happening is that neither of your
> config files in A *or* B are executing.
> If you make A an IIS virtual directory,
> the web.config in /A will execute.
> If you make B an IIS virtual directory,
> the web.config in /B will execute.
> Right now, both A and B are running either off of the
> web.config in /root, if there is one, or off of machine.config.
> Try either...and let us know.
>
> Juan T. Llibre
> ===========
> "Alberto" <albertoconti@.gmail.com> wrote in message
> news:7062a4c9.0412030636.b114179@.posting.google.com...

Web Config conflict?

I have 2 ASP.NET (C#) applications (A and B) running on the same
server (IIS6, but the problems is also present in IIS5).

Each application has its own Web.Config file. The only difference
between the web config files is the following

<system.web>
<httpHandlers>
<add verb="GET" path="cachedimageservice.axd"
type="MsdnMag.CachedImageService,DynamicImage" />
</httpHandlers>
</system.web
When I run application A, which does not contain the above handler, I
get an error: "File or assembly name DynamicImage, or one of its
dependencies, was not found."

It is as if the handler declaration is machine wide and not limited to
application B. What is going on?

Finally, if I add the DynamicImage.dll to application A's bin
directory the error goes away... Application A does NOT make use of
this dll

Any clues?application a must have a reference to the dll. when the page is compiled
(first hit) the compiler will need the dll to complete the compile.

-- bruce (sqlwork.com)

"Alberto" <albertoconti@.gmail.com> wrote in message
news:7062a4c9.0412021418.6e40ad84@.posting.google.c om...
| I have 2 ASP.NET (C#) applications (A and B) running on the same
| server (IIS6, but the problems is also present in IIS5).
|
| Each application has its own Web.Config file. The only difference
| between the web config files is the following
|
| <system.web>
| <httpHandlers>
| <add verb="GET" path="cachedimageservice.axd"
| type="MsdnMag.CachedImageService,DynamicImage" />
| </httpHandlers>
| </system.web>
|
| When I run application A, which does not contain the above handler, I
| get an error: "File or assembly name DynamicImage, or one of its
| dependencies, was not found."
|
| It is as if the handler declaration is machine wide and not limited to
| application B. What is going on?
|
| Finally, if I add the DynamicImage.dll to application A's bin
| directory the error goes away... Application A does NOT make use of
| this dll
|
| Any clues?
Check to see if Application A's directory is declared,
in IIS, as an IIS Virtual Directory or as an IIS Application.

Also, if you could post what the physical
directory structure looks like, it would help
pin down the problem.

Is it:

/root/A/B

or
/root/B/A

or
/root
/A
/B

i.e., is either B or A a subdirectory of the other one,
or are both subdirectories of the root directory ?

Juan T. Llibre
===========
"Alberto" <albertoconti@.gmail.com> wrote in message
news:7062a4c9.0412021418.6e40ad84@.posting.google.c om...
> I have 2 ASP.NET (C#) applications (A and B) running on the same
> server (IIS6, but the problems is also present in IIS5).
> Each application has its own Web.Config file. The only difference
> between the web config files is the following
> <system.web>
> <httpHandlers>
> <add verb="GET" path="cachedimageservice.axd"
> type="MsdnMag.CachedImageService,DynamicImage" />
> </httpHandlers>
> </system.web>
> When I run application A, which does not contain the above handler, I
> get an error: "File or assembly name DynamicImage, or one of its
> dependencies, was not found."
> It is as if the handler declaration is machine wide and not limited to
> application B. What is going on?
> Finally, if I add the DynamicImage.dll to application A's bin
> directory the error goes away... Application A does NOT make use of
> this dll
> Any clues?
"Alberto" <albertoconti@.gmail.com> wrote in message
news:7062a4c9.0412021418.6e40ad84@.posting.google.c om...
>I have 2 ASP.NET (C#) applications (A and B) running on the same
> server (IIS6, but the problems is also present in IIS5).
> Each application has its own Web.Config file. The only difference
> between the web config files is the following
> <system.web>
> <httpHandlers>
> <add verb="GET" path="cachedimageservice.axd"
> type="MsdnMag.CachedImageService,DynamicImage" />
> </httpHandlers>
> </system.web>
> When I run application A, which does not contain the above handler, I
> get an error: "File or assembly name DynamicImage, or one of its
> dependencies, was not found."
> It is as if the handler declaration is machine wide and not limited to
> application B. What is going on?
> Finally, if I add the DynamicImage.dll to application A's bin
> directory the error goes away... Application A does NOT make use of
> this dll
> Any clues?
"Alberto" <albertoconti@.gmail.com> wrote in message
news:7062a4c9.0412021418.6e40ad84@.posting.google.c om...
>I have 2 ASP.NET (C#) applications (A and B) running on the same
> server (IIS6, but the problems is also present in IIS5).
> Each application has its own Web.Config file. The only difference
> between the web config files is the following
> <system.web>
> <httpHandlers>
> <add verb="GET" path="cachedimageservice.axd"
> type="MsdnMag.CachedImageService,DynamicImage" />
> </httpHandlers>
> </system.web>
> When I run application A, which does not contain the above handler, I
> get an error: "File or assembly name DynamicImage, or one of its
> dependencies, was not found."
> It is as if the handler declaration is machine wide and not limited to
> application B. What is going on?
> Finally, if I add the DynamicImage.dll to application A's bin
> directory the error goes away... Application A does NOT make use of
> this dll
> Any clues?

Is Application A under application B virtually? If so, then this is a known
bug, and you've already found the workaround - put the DLL into the bin
folder of application A. You can then use <remove> in the application A
web.config to get rid of the handler.

John Saunders
I think I have solved the problem...

As I mentioned I had 2 applications A and B. However, application A
was the default application when you reached http://site -->
http://site/A. Application B was reachable from a link in application
A or from http://B

Looking at IIS Manager at http://site one sees A and B as a virtual
directory under it... so apparently I was wrong!

In any case, I did the following which solved the problem.
I added a file default.aspx at http://site which contains a simple
<%Response.Redirect("A")%>. Each application then has its own
webconfig file.

Is this the best way to do this?

Thanks
Alberto

"Juan T. Llibre [MVP]" <nomailreplies@.nowhere.com> wrote in message news:<eKG73RV2EHA.1300@.TK2MSFTNGP14.phx.gbl>...
> What's happening is that neither of your
> config files in A *or* B are executing.
> If you make A an IIS virtual directory,
> the web.config in /A will execute.
> If you make B an IIS virtual directory,
> the web.config in /B will execute.
> Right now, both A and B are running either off of the
> web.config in /root, if there is one, or off of machine.config.
> Try either...and let us know.
>
> Juan T. Llibre
> ===========
> "Alberto" <albertoconti@.gmail.com> wrote in message
> news:7062a4c9.0412030636.b114179@.posting.google.co m...
> > Thanks for your replies, but I think I am still really puzzled.
> > The structure of the dir is
> > /root
> > /A
> > /B
> > and neither A not B are virtual directories. So how can this happen?

web config change and IIS restart

I changed the session timeout value in web.config file, but the changes were
not applied
to the new sessions until I restarted IIS.

Is this normal ?

Thanks.

I expected that the new user session will use the new value immediatelly.
P.S.Typically when you save the web.config and changes are detected by IIS it
will cause a application restart without any effort. However I don't know
what the time to do that is. Our servers here instantly detect the changes
and restart.

bill

<Trebor> wrote in message news:ukxHM61MEHA.1272@.tk2msftngp13.phx.gbl...
> I changed the session timeout value in web.config file, but the changes
were
> not applied
> to the new sessions until I restarted IIS.
> Is this normal ?
>
> Thanks.
> I expected that the new user session will use the new value
immediatelly.
> P.S.

Web config error

When you hit my web site I get error in the web config file, but after you hit refresh all is well any clues? Help...well, may be if you post the error and your web.config we could have a "clue" ;-)
Server Error in '/' Application.
------------------------

Cannot use a leading .. to exit above the top directory.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Cannot use a leading .. to exit above the top directory.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HttpException (0x80004005): Cannot use a leading .. to exit above the top directory.]
System.Web.Util.UrlPath.Reduce(String path) +701
System.Web.Util.UrlPath.Combine(String basepath, String relative) +304
System.Web.HttpRequest.MapPath(String virtualPath, String baseVirtualDir, Boolean allowCrossAppMapping) +201
System.Web.HttpServerUtility.MapPath(String path) +61
RSI.CWT.Helper.WebSettings.CacheSetting(NameValueCollection keys) +190
RSI.CWT.Web.Global.Application_Start(Object sender, EventArgs e) +82

------------------------
OK - - show us the line you have that's trying to point to a file above the top directory of your web site? Is it pointing to a database or a regular web file?

It appears that's the problem...show us your code.
It's pointing to a SQL Server for all the content good old port 1433 for now, and an XML file for all the drop down menu's. Hit the site I don't get why it does not work on the intial load then you hit refresh and it does? http://www.galacticinfosys.com

Web Config Error

Ok,
For some reason my web server stopped running so I have uninstalled / reinstalled IIS and that seems to be working. When I go to view one of my ASP.NET pages in a browser I am getting the following error associated with the web.config file. Previously before ISS had to be reinstalled it all ran fine.
Any ideas?

Server Error in '/' Application.

Configuration Error

Description:An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message:It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
Source Error:
Line 3: <system.web>Line 4:Line 5: <authentication mode="Forms"/>Line 6: Line 7: <compilation><assemblies><add assembly="CrystalDecisions.CrystalReports.Engine, Version=9.1.5000.0, Culture=neutral,
PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.ReportSource, Version=9.1.5000.0, Culture=neutral,
PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.Shared, Version=9.1.5000.0, Culture=neutral,
PublicKeyToken=692fbea5521e1304"/><add assembly="CrystalDecisions.Web, Version=9.1.5000.0, Culture=neutral,
PublicKeyToken=692fbea5521e1304"/></assemblies></compilation></system.web>

Source File:c:\inetpub\wwwroot\Web Content Outsourcing and QA Tool\web.config Line:5

Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032You need to make the folder a virtual folder in IIS. When you do not do that, your folder is considered a subfolder of the application in the root.

set the authentication mode to "Off"


Sorted, thanks!
Matt

Web Config Error

I can't figure this out, i've taken everything out of the web.config that could possibly cause a problem and still get this generic garbage...

Server Error in '/' 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>

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File --><configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> </system.web></configuration>

Had this problem yesterday. I had an error on the server that I couldn't simulate on the dev environment. I changed my Web.Config from

<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>

to

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

but in my haste, I didn't close the customErrors tag. See? Then it gave me that horrible message that you received above.

But wait, there's more! I then tried to copy my web.config again, this time WITH the closing tag, but I kept on getting an access denied error from the server. I had to contact the hosting company, one of their tecchies had to fix my web.config file for me, and only then could I continue working on the server again.Embarrassed [:$] How embarrassing!

Hope this helps you in some way...


Is the folder with the offending web.config file configured as anapplication in IIS? Otherwise, it may be a web.config higher upin the directory structuner that's causing the issue.

Hi,

When u create a web application, by default the custom errors mode is remote only. Turn it off and try it again.

HTH.


This worked...thanks.

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

WEB CONFIG DRIVING ME CRAZY

USING ASP.NET EXPRESS BETA 2.O
EVERYTHING IS FINE EXCEPT - STILL TRYING TO VIEW PAGES REMOTELY. I GOT FREE HOSTING SERVICES FROM A 2.0 HOSTER, USING A BETA SERVER. WHEN I VEW PAGES LOCALLY, EVERYTHING IS GOOD.. BUT WHEN I VIEW THE ONE IN THE HOST SERVER - RESULTS TO THIS ERROR:

Server Error in '/' 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>

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File --><configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> </system.web></configuration>


PLEASE HELP..
have you tried to actually follow the directions that it gives you (setting the mode to "Off") so that you can have the server tell you whatsreally the matter?

yes i have..
i've tried every way i could think of - Off, On, Remoteonly etc.
am i missing something??
i didn't have the same problem with .net 1.1
please advise.
here is a portion of my web.config
<system.web>
<compilation debug="False" />
<authentication mode="Windows" />

<customeErrors mode ="Off"/>

</system.web>
</configuration>


Hello.
Well, I think that you can always handle the error on your global.asax file or, even better, you can configure your app so that it uses the health monitoring api to send you an email with info about the error you're facing (this last option wouldn't need any coding).
Try changing "<customeErrors mode ="Off"/>" to "<customErrors mode ="Off"/>"

Web Config File

Where can I go to learn more about the web config file, information such as what can go into this file, the format etc

ThanksThere are many resources out there, trying searching for "web.config tutorial" example etc... http://www.dotnetjunkies.com/quickstart/aspplus/doc/configformat.aspx