Click here to Skip to main content
15,889,403 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: help me check my executescaler Pin
enjoycrack3-Apr-07 17:59
enjoycrack3-Apr-07 17:59 
GeneralRe: help me check my executescaler Pin
neodeaths3-Apr-07 18:46
neodeaths3-Apr-07 18:46 
GeneralRe: help me check my executescaler Pin
enjoycrack3-Apr-07 18:54
enjoycrack3-Apr-07 18:54 
GeneralRe: help me check my executescaler Pin
neodeaths3-Apr-07 19:37
neodeaths3-Apr-07 19:37 
AnswerRe: help me check my executescaler Pin
Venkatesh Mookkan3-Apr-07 18:52
Venkatesh Mookkan3-Apr-07 18:52 
GeneralRe: help me check my executescaler Pin
neodeaths3-Apr-07 19:11
neodeaths3-Apr-07 19:11 
GeneralRe: help me check my executescaler Pin
Venkatesh Mookkan3-Apr-07 19:42
Venkatesh Mookkan3-Apr-07 19:42 
GeneralRe: help me check my executescaler Pin
neodeaths3-Apr-07 20:10
neodeaths3-Apr-07 20:10 
please know taht i am using asp.net2 (2005) with sql server 2005 thx


<?xml version="1.0" encoding="utf-8"?><br />
<configuration xmlns=<br />
"http://schemas.microsoft.com/.NetConfiguration/v2.0"><br />
  <connectionStrings><br />
    <add name="HASDBConnectionString1" connectionString="Data Source=------\SQLEXPRESS;Initial Catalog=HASDB;Persist Security Info=True;User ID=sa;Password=---"<br />
     providerName="System.Data.SqlClient" /><br />
  </connectionStrings><br />
  <system.web><br />
    <authorization><br />
      <allow roles="Registrator" /><br />
      <deny users="*" /><br />
    </authorization><br />
  </system.web><br />
</configuration>


the above is my web.config in the subfolder where the page i am working on is

<?xml version="1.0"?><br />
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"><br />
	<connectionStrings><br />
  <add name="HASDBConnectionString1" connectionString="Data Source=---\SQLEXPRESS;Initial Catalog=HASDB;Persist Security Info=True;User ID=sa;Password=---"<br />
   providerName="System.Data.SqlClient" /><br />
 </connectionStrings><br />
 <system.web><br />
<br />
   <membership defaultProvider="MyMembershipProvider"><br />
     <providers><br />
       <add name="MyMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="HASDBConnectionString1" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression="" /><br />
     </providers><br />
   </membership><br />
   <br />
<br />
     <br />
     <br />
		<roleManager enabled="true" defaultProvider="MyMembershipProvider"><br />
     <providers><br />
       <add name="MyMembershipProvider" connectionStringName="HASDBConnectionString1" applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /><br />
       <add name="AspNetWindowsTokenRoleProvider" applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /><br />
     </providers><br />
   </roleManager><br />
		<authentication mode="Forms" /><br />
		<compilation debug="true"/><br />
    <authorization><br />
<br />
      <deny users="?" /><br />
    </authorization><br />
   <br />
  </system.web>  <br />
  <system.net><br />
<br />
    <mailSettings><br />
<br />
      <smtp><br />
        <network host="my.mail.server" /><br />
      </smtp><br />
    </mailSettings><br />
  </system.net><br />
</configuration>

this is the web.config of my main project


SqlConnection conn = new SqlConnection(ConfigurationManager.AppSettings["ConnectionStrings"]);<br />
        SqlCommand command = new SqlCommand("Select CurrentNo From LookUpID Where TypeID = 'AuctionSessionID'",conn);<br />
        conn.Open();<br />
        string result = command.ExecuteScalar().ToString();<br />
        Label2.Text = result;<br />
        conn.Close();




The ConnectionString property has not been initialized.
GeneralRe: help me check my executescaler Pin
neodeaths3-Apr-07 20:38
neodeaths3-Apr-07 20:38 
GeneralRe: help me check my executescaler Pin
Venkatesh Mookkan3-Apr-07 21:14
Venkatesh Mookkan3-Apr-07 21:14 
GeneralRe: help me check my executescaler Pin
neodeaths3-Apr-07 21:23
neodeaths3-Apr-07 21:23 
GeneralRe: help me check my executescaler Pin
Venkatesh Mookkan3-Apr-07 21:34
Venkatesh Mookkan3-Apr-07 21:34 
GeneralRe: help me check my executescaler Pin
neodeaths3-Apr-07 21:43
neodeaths3-Apr-07 21:43 
GeneralRe: help me check my executescaler Pin
Colin Angus Mackay3-Apr-07 21:14
Colin Angus Mackay3-Apr-07 21:14 
AnswerRe: help me check my executescaler Pin
meghak3-Apr-07 21:47
meghak3-Apr-07 21:47 
QuestionAccessing IIS server from other computers.. Pin
MinhajuddinK3-Apr-07 16:28
MinhajuddinK3-Apr-07 16:28 
AnswerRe: Accessing IIS server from other computers.. Pin
N a v a n e e t h3-Apr-07 17:11
N a v a n e e t h3-Apr-07 17:11 
AnswerRe: Accessing IIS server from other computers.. Pin
Venkatesh Mookkan3-Apr-07 18:56
Venkatesh Mookkan3-Apr-07 18:56 
QuestionRetrieving ViewState value across Page events Pin
tjkota3-Apr-07 13:43
tjkota3-Apr-07 13:43 
AnswerRe: Retrieving ViewState value across Page events Pin
N a v a n e e t h3-Apr-07 17:20
N a v a n e e t h3-Apr-07 17:20 
QuestionAssembly problem Pin
DanB19833-Apr-07 10:21
DanB19833-Apr-07 10:21 
Questionmanage session Pin
ASPDevelopper12348753-Apr-07 7:52
ASPDevelopper12348753-Apr-07 7:52 
AnswerRe: manage session Pin
ToddHileHoffer3-Apr-07 8:01
ToddHileHoffer3-Apr-07 8:01 
GeneralRe: manage session Pin
ASPDevelopper12348753-Apr-07 8:27
ASPDevelopper12348753-Apr-07 8:27 
QuestionEdit &lt;head> in page with code behind file Pin
Alice@mywonderland3-Apr-07 7:08
Alice@mywonderland3-Apr-07 7:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.