I am trying to use a connection string from web.config file for the first time. Here is my code.
Try
Dim cmd As String = _
("SELECT [Name], BirthDate, StartDate From " & _
"Employees WHERE PayGroup='20' AND Status='A'")
Dim conn As String = _
System.Configuration. _
ConfigurationManager. _
AppSettings("myConString")
Dim myConn As New SqlConnection(conn)
Dim myCmd As New SqlDataAdapter(cmd, myConn)
Dim ds As New DataSet
myCmd.Fill(ds)
gvEmp.DataSource = ds
gvEmp.DataBind()
Catch ex As Exception
Response.Write(ex.Message & "<br>")
Finally
End Try
I am getting The ConnectionString property has not been initialized. What am I doing wrong?Show your web.config code.
<connectionStrings>
<add name="myConString" connectionString="Data Source=myServer;Initial Catalog=Employees;User ID=myUser;Password=mypass"
providerName="System.Data.SqlClient" />
</connectionStrings>
Showing posts with label config. Show all posts
Showing posts with label config. Show all posts
Monday, March 26, 2012
The ConnectionString property has not been initialized.
Labels:
asp,
cmd,
code,
config,
connection,
connectionstring,
dim,
file,
initialized,
net,
property,
string,
time,
web
The ConnectionString property has not been initialized.
Tried all kinds of things. I get the error.
The ConnectionString property has not been initialized.
Any help appreciated.
----
--
This is the web.config info
<configuration>
<appSettings>
<add key="connectionstring" value="Data Source=path to database;
database=testingsite;User Id=UserID;Password=password" />
</appSettings>
----
----
--
Here is the doc mentioned in the error.
Imports System.Data.SqlClient
Public Class Catalog
Public Shared Function GetDepartments() As SqlDataReader
' Create the connection object
Dim connection As New SqlConnection(connectionString)
' Create and initialize the command object
Dim command As New SqlCommand("dbo.GetDepartments", connection)
command.CommandType = CommandType.StoredProcedure
' Open the connection
connection.Open()
' Return a SqlDataReader to the calling function
Return command.ExecuteReader(CommandBehavior.CloseConnection)
End Function
Private Shared ReadOnly Property connectionString() As String
Get
Return ConfigurationSettings.AppSettings("ConnectionString")
End Get
End Property
End ClassLaura K wrote:
> Tried all kinds of things. I get the error.
> The ConnectionString property has not been initialized.
>
> Any help appreciated.
> ----
--
> This is the web.config info
> <configuration>
> <appSettings>
> <add key="connectionstring" value="Data Source=path to database;
> database=testingsite;User Id=UserID;Password=password" />
> </appSettings>
> ----
----
--
> Here is the doc mentioned in the error.
>
> Imports System.Data.SqlClient
>
> Public Class Catalog
> Public Shared Function GetDepartments() As SqlDataReader
> ' Create the connection object
> Dim connection As New SqlConnection(connectionString)
> ' Create and initialize the command object
> Dim command As New SqlCommand("dbo.GetDepartments", connection)
> command.CommandType = CommandType.StoredProcedure
> ' Open the connection
> connection.Open()
> ' Return a SqlDataReader to the calling function
> Return command.ExecuteReader(CommandBehavior.CloseConnection)
> End Function
> Private Shared ReadOnly Property connectionString() As String
> Get
> Return ConfigurationSettings.AppSettings("ConnectionString")
> End Get
> End Property
> End Class
>
I know the tags are case-sensitive in web.config. Can't remember about
the keys/vals values. Try changing the case sensitivity of your
.AppSettings call or the key name in the config (make them the same).
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
I tried dozen of case changes. That doesn't seem to be it.
Any other ideas?
"Craig Deelsnyder" <cdeelsny@dotnet.itags.org.NO_SPAM_4_MEyahoo.com> wrote in message
news:O4c2gb2UFHA.3584@dotnet.itags.org.TK2MSFTNGP14.phx.gbl...
> Laura K wrote:
> I know the tags are case-sensitive in web.config. Can't remember about
> the keys/vals values. Try changing the case sensitivity of your
> .AppSettings call or the key name in the config (make them the same).
> --
> Craig Deelsnyder
> Microsoft MVP - ASP/ASP.NET
Try this:-
<add key="ConnectionString" value="Data Source=(local);
database=Northwind; Integrated Security=SSPI" />
MAKE SURE U ARE PASSING THE CORRECT KEY IN UR APPLICATION.
Patrick
*** Sent via Developersdex http://www.examnotes.net ***
> <add key="connectionstring" value="Data Source=path to database;
> database=testingsite;User Id=UserID;Password=password" />
When this says "path to database", what exactly is the value you're specifyi
ng?
It should be "servername" or "servername\instance".
-Brock
DevelopMentor
http://staff.develop.com/ballen
Patrick Olurotimi Ige wrote:
> Try this:-
> <add key="ConnectionString" value="Data Source=(local);
> database=Northwind; Integrated Security=SSPI" />
> MAKE SURE U ARE PASSING THE CORRECT KEY IN UR APPLICATION.
> Patrick
>
> *** Sent via Developersdex http://www.examnotes.net ***
Heh, I blew right past that part :) Obviously that's pry the problem...
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
When I say path to database it is remote.
sql3.webcontrolcenter.com
"Brock Allen" <ballen@dotnet.itags.org.NOSPAMdevelop.com> wrote in message
news:680347632511475258348832@dotnet.itags.org.msnews.microsoft.com...
> When this says "path to database", what exactly is the value you're
> specifying? It should be "servername" or "servername\instance".
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
>
Brock good u figured out that issue ..
And Laura have u finally fixed the connection?
Patrick
*** Sent via Developersdex http://www.examnotes.net ***
Nope connection not fixed. I am also posting this on another forum. Here
is a list of docs. would love to have help. I am totally lost on this one.
Here is the exact same thing as I posted on the other forum. Any help
appreciated.
Here is the situation. I am following a book, "Beginning ASP.NET 1.1
E-Commerce. The book has me working on a local SQL server. I am working
remotly and trying to make the changes needed to do it that way.
Instead of posting code I will post a txt version of the docs.
This contains the code for the connection
http://209.200.112.194/txtdocs/catalog.vb.txt
This is a user control code behind
http://209.200.112.194/txtdocs/depa...ist.ascx.vb.txt
this is the user control - view source to see the code
http://209.200.112.194/txtdocs/departmentslist.ascx.txt
web config
http://209.200.112.194/txtdocs/web.config.txt
Help?
Laura
"Patrick Olurotimi Ige" <naijacoder@dotnet.itags.org.hotmail.com> wrote in message
news:Otxjw$EVFHA.2616@dotnet.itags.org.TK2MSFTNGP14.phx.gbl...
> Brock good u figured out that issue ..
> And Laura have u finally fixed the connection?
> Patrick
>
> *** Sent via Developersdex http://www.examnotes.net ***
Laura maybe you can give a try like this:-
Don't use:-
ConfigurationSettings.AppSettings("ConnectionString")
Try including your connectionstring in ur code like:-
Dim connection As New SqlConnection("Data Source=SERVERNAME;Initial
Catalog=YOURDATABASE;User Id=sa;Password=asdasd;")
Hope that helps
** See how it goes**
Patrick
*** Sent via Developersdex http://www.examnotes.net ***
The ConnectionString property has not been initialized.
Any help appreciated.
----
--
This is the web.config info
<configuration>
<appSettings>
<add key="connectionstring" value="Data Source=path to database;
database=testingsite;User Id=UserID;Password=password" />
</appSettings>
----
----
--
Here is the doc mentioned in the error.
Imports System.Data.SqlClient
Public Class Catalog
Public Shared Function GetDepartments() As SqlDataReader
' Create the connection object
Dim connection As New SqlConnection(connectionString)
' Create and initialize the command object
Dim command As New SqlCommand("dbo.GetDepartments", connection)
command.CommandType = CommandType.StoredProcedure
' Open the connection
connection.Open()
' Return a SqlDataReader to the calling function
Return command.ExecuteReader(CommandBehavior.CloseConnection)
End Function
Private Shared ReadOnly Property connectionString() As String
Get
Return ConfigurationSettings.AppSettings("ConnectionString")
End Get
End Property
End ClassLaura K wrote:
> Tried all kinds of things. I get the error.
> The ConnectionString property has not been initialized.
>
> Any help appreciated.
> ----
--
> This is the web.config info
> <configuration>
> <appSettings>
> <add key="connectionstring" value="Data Source=path to database;
> database=testingsite;User Id=UserID;Password=password" />
> </appSettings>
> ----
----
--
> Here is the doc mentioned in the error.
>
> Imports System.Data.SqlClient
>
> Public Class Catalog
> Public Shared Function GetDepartments() As SqlDataReader
> ' Create the connection object
> Dim connection As New SqlConnection(connectionString)
> ' Create and initialize the command object
> Dim command As New SqlCommand("dbo.GetDepartments", connection)
> command.CommandType = CommandType.StoredProcedure
> ' Open the connection
> connection.Open()
> ' Return a SqlDataReader to the calling function
> Return command.ExecuteReader(CommandBehavior.CloseConnection)
> End Function
> Private Shared ReadOnly Property connectionString() As String
> Get
> Return ConfigurationSettings.AppSettings("ConnectionString")
> End Get
> End Property
> End Class
>
I know the tags are case-sensitive in web.config. Can't remember about
the keys/vals values. Try changing the case sensitivity of your
.AppSettings call or the key name in the config (make them the same).
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
I tried dozen of case changes. That doesn't seem to be it.
Any other ideas?
"Craig Deelsnyder" <cdeelsny@dotnet.itags.org.NO_SPAM_4_MEyahoo.com> wrote in message
news:O4c2gb2UFHA.3584@dotnet.itags.org.TK2MSFTNGP14.phx.gbl...
> Laura K wrote:
> I know the tags are case-sensitive in web.config. Can't remember about
> the keys/vals values. Try changing the case sensitivity of your
> .AppSettings call or the key name in the config (make them the same).
> --
> Craig Deelsnyder
> Microsoft MVP - ASP/ASP.NET
Try this:-
<add key="ConnectionString" value="Data Source=(local);
database=Northwind; Integrated Security=SSPI" />
MAKE SURE U ARE PASSING THE CORRECT KEY IN UR APPLICATION.
Patrick
*** Sent via Developersdex http://www.examnotes.net ***
> <add key="connectionstring" value="Data Source=path to database;
> database=testingsite;User Id=UserID;Password=password" />
When this says "path to database", what exactly is the value you're specifyi
ng?
It should be "servername" or "servername\instance".
-Brock
DevelopMentor
http://staff.develop.com/ballen
Patrick Olurotimi Ige wrote:
> Try this:-
> <add key="ConnectionString" value="Data Source=(local);
> database=Northwind; Integrated Security=SSPI" />
> MAKE SURE U ARE PASSING THE CORRECT KEY IN UR APPLICATION.
> Patrick
>
> *** Sent via Developersdex http://www.examnotes.net ***
Heh, I blew right past that part :) Obviously that's pry the problem...
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
When I say path to database it is remote.
sql3.webcontrolcenter.com
"Brock Allen" <ballen@dotnet.itags.org.NOSPAMdevelop.com> wrote in message
news:680347632511475258348832@dotnet.itags.org.msnews.microsoft.com...
> When this says "path to database", what exactly is the value you're
> specifying? It should be "servername" or "servername\instance".
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>
>
Brock good u figured out that issue ..
And Laura have u finally fixed the connection?
Patrick
*** Sent via Developersdex http://www.examnotes.net ***
Nope connection not fixed. I am also posting this on another forum. Here
is a list of docs. would love to have help. I am totally lost on this one.
Here is the exact same thing as I posted on the other forum. Any help
appreciated.
Here is the situation. I am following a book, "Beginning ASP.NET 1.1
E-Commerce. The book has me working on a local SQL server. I am working
remotly and trying to make the changes needed to do it that way.
Instead of posting code I will post a txt version of the docs.
This contains the code for the connection
http://209.200.112.194/txtdocs/catalog.vb.txt
This is a user control code behind
http://209.200.112.194/txtdocs/depa...ist.ascx.vb.txt
this is the user control - view source to see the code
http://209.200.112.194/txtdocs/departmentslist.ascx.txt
web config
http://209.200.112.194/txtdocs/web.config.txt
Help?
Laura
"Patrick Olurotimi Ige" <naijacoder@dotnet.itags.org.hotmail.com> wrote in message
news:Otxjw$EVFHA.2616@dotnet.itags.org.TK2MSFTNGP14.phx.gbl...
> Brock good u figured out that issue ..
> And Laura have u finally fixed the connection?
> Patrick
>
> *** Sent via Developersdex http://www.examnotes.net ***
Laura maybe you can give a try like this:-
Don't use:-
ConfigurationSettings.AppSettings("ConnectionString")
Try including your connectionstring in ur code like:-
Dim connection As New SqlConnection("Data Source=SERVERNAME;Initial
Catalog=YOURDATABASE;User Id=sa;Password=asdasd;")
Hope that helps
** See how it goes**
Patrick
*** Sent via Developersdex http://www.examnotes.net ***
Labels:
appreciated,
asp,
config,
connectionstring,
error,
initialized,
kinds,
net,
property,
web
Saturday, March 24, 2012
The element 'compilation' has invalid child element 'compilers
Thanks for the response.
I removed it entirely from web.config as it is apparently unnecessary.
Guess I wish the migration wizard could of either 1) removed it for me or 2)
flagged it as a todo with an explanation.
Thx.
R-
"Juan T. Llibre" wrote:
> In 2.0, the <compilers> section is found in machine.config,
> so you don't need to place it in web.config.
> Check out machine.config.comments in the .Net Framework\config dir.
> The syntax has changed.
> It's now in the <system.codedom> section.
> See : http://msdn2.microsoft.com/en-us/library/e4hwk57e.aspx
>
>
> Juan T. Llibre, ASP.NET MVP
> ASP.NET FAQ : http://asp.net.do/faq/
> ASPNETFAQ.COM : http://www.aspnetfaq.com/
> Foros de ASP.NET en Espa?ol : http://asp.net.do/foros/
> ======================================
> "Robert" <robertv@dotnet.itags.org.noemail.nospam> wrote in message
> news:9999C8CB-CF4F-4F1A-89A5-775753A7B124@dotnet.itags.org.microsoft.com...
>
>Hi Robert,
Yes, what a pity that the migration wizard was not able to automatically
correct this, maybe it is due to the <system.codedom> is outside the
<system.web> that beyond the migration checking. Anyway, the error message
make some sense, also thanks for Juan's informative suggestion.
Thanks,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
| Thread-Topic: The element 'compilation' has invalid child element
'compilers
| thread-index: AcXpe7dhGIAffoz4SzOtjdSjQDOyUA==
| X-WBNR-Posting-Host: 67.180.214.235
| From: examnotes <robertv@.noemail.nospam>
| References: <9999C8CB-CF4F-4F1A-89A5-775753A7B124@.microsoft.com>
<ewe5xmX6FHA.3924@.TK2MSFTNGP10.phx.gbl>
| Subject: Re: The element 'compilation' has invalid child element
'compilers
| Date: Mon, 14 Nov 2005 16:30:01 -0800
| Lines: 72
| Message-ID: <0A4CC52E-0180-414A-9D4D-DAF5F94820F1@.microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 8bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:358118
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Thanks for the response.
|
| I removed it entirely from web.config as it is apparently unnecessary.
|
| Guess I wish the migration wizard could of either 1) removed it for me or
2)
| flagged it as a todo with an explanation.
|
| Thx.
| R-
|
| "Juan T. Llibre" wrote:
|
| > In 2.0, the <compilers> section is found in machine.config,
| > so you don't need to place it in web.config.
| >
| > Check out machine.config.comments in the .Net Framework\config dir.
| >
| > The syntax has changed.
| > It's now in the <system.codedom> section.
| >
| > See : http://msdn2.microsoft.com/en-us/library/e4hwk57e.aspx
| >
| >
| >
| >
| > Juan T. Llibre, ASP.NET MVP
| > ASP.NET FAQ : http://asp.net.do/faq/
| > ASPNETFAQ.COM : http://www.aspnetfaq.com/
| > Foros de ASP.NET en Espa?ol : http://asp.net.do/foros/
| > ======================================
| > "Robert" <robertv@.noemail.nospam> wrote in message
| > news:9999C8CB-CF4F-4F1A-89A5-775753A7B124@.microsoft.com...
| > >I have a number of web projects converted from 1.1 to 2.0 in VS2005.
| > >
| > > I am methodically seeing the error below:
| > >
| > > The element 'compilation' has invalid child element 'compilers'.
List of
| > > possible elements expected: 'assemblies, buildProviders,
codeSubDirectories,
| > > expressionBuilders'.
| > >
| > > Here's what the web config looks like. The error doesn't cause any
issues
| > > and according to the MSDN documentation this is valid. So why is
VS2005
| > > giving me this bogus error?
| > >
| > > <configuration>
| > > <system.web>
| > > <httpRuntime maxRequestLength="8192"/>
| > > <!-- DYNAMIC DEBUG COMPILATION
| > > Set compilation debug="true" to insert debugging symbols
(.pdb
| > > information)
| > > into the compiled page. Because this creates a larger file
that
| > > executes
| > > more slowly, you should set this value to true only when
debugging
| > > and to
| > > false at all other times. For more information, refer to the
| > > documentation about
| > > debugging ASP.NET files.
| > > -->
| > > <compilation defaultLanguage="vb" debug="true" batch="false">
| > > <compilers>
| > > <compiler language="vb" type="Microsoft.VisualBasic.VBCodeProvider,
| > > System, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=B77A5C561934E089"
| > > extension=".VB" compilerOptions="/define:Debug=True /define:Trace=True
| > >
/imports:Microsoft.VisualBasic,System,System.Collections,System.Configuratio
n,System.Data,System.Drawing,System.Web,System.Web.UI,System.Web.UI.HtmlCont
rols,System.Web.UI.WebControls"/></compilers>
| > > <assemblies>
| > >
| > > etc, etc,
| > >
| > >
| >
| >
| >
|
I removed it entirely from web.config as it is apparently unnecessary.
Guess I wish the migration wizard could of either 1) removed it for me or 2)
flagged it as a todo with an explanation.
Thx.
R-
"Juan T. Llibre" wrote:
> In 2.0, the <compilers> section is found in machine.config,
> so you don't need to place it in web.config.
> Check out machine.config.comments in the .Net Framework\config dir.
> The syntax has changed.
> It's now in the <system.codedom> section.
> See : http://msdn2.microsoft.com/en-us/library/e4hwk57e.aspx
>
>
> Juan T. Llibre, ASP.NET MVP
> ASP.NET FAQ : http://asp.net.do/faq/
> ASPNETFAQ.COM : http://www.aspnetfaq.com/
> Foros de ASP.NET en Espa?ol : http://asp.net.do/foros/
> ======================================
> "Robert" <robertv@dotnet.itags.org.noemail.nospam> wrote in message
> news:9999C8CB-CF4F-4F1A-89A5-775753A7B124@dotnet.itags.org.microsoft.com...
>
>Hi Robert,
Yes, what a pity that the migration wizard was not able to automatically
correct this, maybe it is due to the <system.codedom> is outside the
<system.web> that beyond the migration checking. Anyway, the error message
make some sense, also thanks for Juan's informative suggestion.
Thanks,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
| Thread-Topic: The element 'compilation' has invalid child element
'compilers
| thread-index: AcXpe7dhGIAffoz4SzOtjdSjQDOyUA==
| X-WBNR-Posting-Host: 67.180.214.235
| From: examnotes <robertv@.noemail.nospam>
| References: <9999C8CB-CF4F-4F1A-89A5-775753A7B124@.microsoft.com>
<ewe5xmX6FHA.3924@.TK2MSFTNGP10.phx.gbl>
| Subject: Re: The element 'compilation' has invalid child element
'compilers
| Date: Mon, 14 Nov 2005 16:30:01 -0800
| Lines: 72
| Message-ID: <0A4CC52E-0180-414A-9D4D-DAF5F94820F1@.microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 8bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:358118
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Thanks for the response.
|
| I removed it entirely from web.config as it is apparently unnecessary.
|
| Guess I wish the migration wizard could of either 1) removed it for me or
2)
| flagged it as a todo with an explanation.
|
| Thx.
| R-
|
| "Juan T. Llibre" wrote:
|
| > In 2.0, the <compilers> section is found in machine.config,
| > so you don't need to place it in web.config.
| >
| > Check out machine.config.comments in the .Net Framework\config dir.
| >
| > The syntax has changed.
| > It's now in the <system.codedom> section.
| >
| > See : http://msdn2.microsoft.com/en-us/library/e4hwk57e.aspx
| >
| >
| >
| >
| > Juan T. Llibre, ASP.NET MVP
| > ASP.NET FAQ : http://asp.net.do/faq/
| > ASPNETFAQ.COM : http://www.aspnetfaq.com/
| > Foros de ASP.NET en Espa?ol : http://asp.net.do/foros/
| > ======================================
| > "Robert" <robertv@.noemail.nospam> wrote in message
| > news:9999C8CB-CF4F-4F1A-89A5-775753A7B124@.microsoft.com...
| > >I have a number of web projects converted from 1.1 to 2.0 in VS2005.
| > >
| > > I am methodically seeing the error below:
| > >
| > > The element 'compilation' has invalid child element 'compilers'.
List of
| > > possible elements expected: 'assemblies, buildProviders,
codeSubDirectories,
| > > expressionBuilders'.
| > >
| > > Here's what the web config looks like. The error doesn't cause any
issues
| > > and according to the MSDN documentation this is valid. So why is
VS2005
| > > giving me this bogus error?
| > >
| > > <configuration>
| > > <system.web>
| > > <httpRuntime maxRequestLength="8192"/>
| > > <!-- DYNAMIC DEBUG COMPILATION
| > > Set compilation debug="true" to insert debugging symbols
(.pdb
| > > information)
| > > into the compiled page. Because this creates a larger file
that
| > > executes
| > > more slowly, you should set this value to true only when
debugging
| > > and to
| > > false at all other times. For more information, refer to the
| > > documentation about
| > > debugging ASP.NET files.
| > > -->
| > > <compilation defaultLanguage="vb" debug="true" batch="false">
| > > <compilers>
| > > <compiler language="vb" type="Microsoft.VisualBasic.VBCodeProvider,
| > > System, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=B77A5C561934E089"
| > > extension=".VB" compilerOptions="/define:Debug=True /define:Trace=True
| > >
/imports:Microsoft.VisualBasic,System,System.Collections,System.Configuratio
n,System.Data,System.Drawing,System.Web,System.Web.UI,System.Web.UI.HtmlCont
rols,System.Web.UI.WebControls"/></compilers>
| > > <assemblies>
| > >
| > > etc, etc,
| > >
| > >
| >
| >
| >
|
Tuesday, March 13, 2012
The issue with web.config?
When I implement .Net application in design period then web.config file is text file and is editable. If I use VS.Net package tool to package application and distribute to client's machine. The end user can edit the web.config file?
I doubt it can't be edited and also hide in the exe file.
Thanks in advance!what?
I'm not quite following the question, but if you mean what I think you mean,of course the end user can edit it if they want to. you can't stop them. explain yourself.
I set the security level in the web.config and distribute the client machine the installation package. It the end user can edit the web.config in his/her machine, then what I set for security not meaningful - I can't set secrity from web.config.
still not quite making sense.
I think I know what you're on about, and yes, if you want to use a textfile to control your security, then your security will be quite trivialto bypass...
perhaps you should actually explain what you're trying to do with web.configexactly
I doubt it can't be edited and also hide in the exe file.
Thanks in advance!what?
I'm not quite following the question, but if you mean what I think you mean,of course the end user can edit it if they want to. you can't stop them. explain yourself.
I set the security level in the web.config and distribute the client machine the installation package. It the end user can edit the web.config in his/her machine, then what I set for security not meaningful - I can't set secrity from web.config.
still not quite making sense.
I think I know what you're on about, and yes, if you want to use a textfile to control your security, then your security will be quite trivialto bypass...
perhaps you should actually explain what you're trying to do with web.configexactly
Subscribe to:
Posts (Atom)