|
|
Hi All,
What is the Difference between Unit Testing and UserAcceptanceTesting.
Tell me Briefly what we have to do in UserAcceptanceTesting.It is also related to Testing pages ?
Thanks inAdvance
|
|
|
|
|
siddisagar wrote: What is the Difference between Unit Testing and UserAcceptanceTesting.
Unit testing is testing the individual units of an application, preferably in isolation. This ensures that all (or almost all) the code is exercised and producing the correct results.
User Acceptance Testing is just as the name suggests. It is testing performed by the users so that they may determine if the software is acceptable.
siddisagar wrote: Tell me Briefly what we have to do in UserAcceptanceTesting
Give the software to the users. Ask them to perform the tasks that they wish to do with the software. Get them to report on anything that does not work.
|
|
|
|
|
SqlConnection conn = new SqlConnection(ConfigurationSettings.AppSettings("ConnectionString"));<br />
SqlCommand command = new SqlCommand("Select CurrentNo From LookUpID Where TypeID = 'AuctionSessionID'",conn);<br />
<br />
string result = command.ExecuteScalar().ToString();<br />
Label2.Text = result;
y does it keep saying Error 9 'System.Configuration.ConfigurationSettings.AppSettings' is a 'property' but is used like a 'method'
i am using asp.net2
and my web.config connection is:
<connectionStrings><br />
<add name="HASDBConnectionString1" connectionString="Data Source=----\SQLEXPRESS;Initial Catalog=HASDB;Persist Security Info=True;User ID=---;Password=----"<br />
providerName="System.Data.SqlClient" /><br />
</connectionStrings>
|
|
|
|
|
hi there:
try this ConfigurationSettings.AppSettings["ConnectionString"];
<< >>
|
|
|
|
|
SqlConnection conn = new SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);<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();
error: The ConnectionString property has not been initialized
erm.. just to chk my ConfigurationManager.AppSettings["ConnectionString"]);
the connectionstring remain? in regards to my original post.
|
|
|
|
|
there is no name ConnectionString in your web.config right?
I saw it was HASDBConnectionString1, so just try to use this name instead of ConnectionString
<< >>
|
|
|
|
|
its still the same saying it has not been initialise...
is executedscaler very hard to use?
i been trying out for veri long still cannot work
the asp.net2 developers makes displaying multiple data in datagrid so easy yet they forgot to make dispalying single data easy.....
|
|
|
|
|
For,
neodeaths wrote: SqlConnection conn = new SqlConnection(ConfigurationSettings.AppSettings("ConnectionString"));
Use,
SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"]);
|
|
|
|
|
SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"]);<br />
<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();
error:Error 59 Argument '1': cannot convert from 'System.Configuration.ConnectionStringSettings' to 'string'
and
Error 58 The best overloaded method match for 'System.Data.SqlClient.SqlConnection.SqlConnection(string)' has some invalid arguments
now these 2 errors...
|
|
|
|
|
Can you send the content of your web.config file? I have a doubt whether you have the key with name "ConnectionString"...
|
|
|
|
|
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.
|
|
|
|
|
SqlConnection conn = new SqlConnection(ConfigurationManager.AppSettings["connectionStrings"]);
by the way for my knowledge =P
what does the above code the part where i underline stand for?
is it something in the web.config?
or an variable?
|
|
|
|
|
neodeaths wrote: SqlConnection conn = new SqlConnection(ConfigurationManager.AppSettings["connectionStrings"]);
SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["HASDBConnectionString1"]);
Do not use ConfigurationManager.AppSettings as you have placed the key inside connectionStrings section of the configuration file.
neodeaths wrote: SqlConnection conn = new SqlConnection(ConfigurationManager.AppSettings["ConnectionStrings"]);
The ConnectionString is the key name you specified in the web.config file in the connectionStrings section. In your configuration file you are using HASDBConnectionString1 as the key name.
|
|
|
|
|
firstly:
after i change it to<br />
SqlConnection conn = new SqlConnection("HASDBConnectionString1 ");<br />
SqlCommand command = new SqlCommand("Select CurrentNo From LookUpID Where TypeID = 'AuctionSessionID'",conn);
i changed it to the above code and a new error appear at runtime.
Format of the initialization string does not conform to specification starting at index 0.
2nd:
so if i get u rite the configurationmanager.appsetting is a method that will use the specified connectionstring which is in the root folder?
3rd: i appreciated ur pateint with my noobish question =)
|
|
|
|
|
neodeaths wrote: SqlConnection conn = new SqlConnection("HASDBConnectionString1 ");
This is wrong. I am afraid whether you know .NET or not.
Use like this,
SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["HASDBConnectionString1"]);
|
|
|
|
|
!!
it works now thx
SqlConnection conn = new SqlConnection((ConfigurationManager.ConnectionStrings["HASDBConnectionString1"]).ToString());
and by the way the first argument need to be change to a string first be4 used
but thx for everything really appreiciated it
at the mean time i am gonna go read and test the executescaler method more thx alot
|
|
|
|
|
It is something in the web.config. If it doesn't exist then your code won't work. You really should abstract that kind of all out into a configuration class that can handle events such as missing configuration elements.
|
|
|
|
|
hi,
If you are using Asp.Net 2.0 your code
SqlConnection conn = new SqlConnection(ConfigurationSettings.AppSettings("ConnectionString"));
should be
SqlConnection conn = new SqlConnection(System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"].ToString());
next I dont know abt the code you are using in web.config if it can work that way but here is what I use
<configuration>
<appSettings>
<add key="connectionString" value="initial catalog=----;data source=---;user id=---;password=---;">
</add>
</appSettings>
</configuration>
try by changing the first code only see if that works
Regards,
Maggi
|
|
|
|
|
Hi there!
I have deployed my site on an IIS server.
And its working fine.
But I don't know how to access it from other machines..
I have tried accessing by
http://192.168.1.28
where the number is the IP of the IIS server.
Thanks for your help..
You don't have to be AFRAID!
|
|
|
|
|
Try like this
http://192.168.1.28/yourvirtualdirectory/home.aspx
OR
http://yoursysname/yourvirtualdirectory/home.aspx
|
|
|
|
|
Which is the Operating System of your Webserver (IIS Server)?
If it is Windows XP (SP2 Installed), the personal firewall blocks the other machine to connect the server through the port 80 (TCP/IP default port). You have set exception in the firewall to the 80 port.
|
|
|
|
|
Hello, I am trying to enable/disable a textbox prior to the page rendering based on its value. To be able to access the textbox value I had to implement this in Page_LoadComplete event of the page. After the enable/disable logic in Page_LoadComplete I obtain a boolean value that I save to ViewState and access it from Page.IsPostBack( ) method of Page_Load. I tried using ViewState to save the value as string and retrieve it in Page.IsPostBack( ) method but I am getting a NullReferenceException meaning the value of the ViewState variable is null. Why is the state not saving in ViewState variable? Here is my Page_LoadComplete method:
public void Page_LoadComplete(object sender, System.EventArgs e)
{
//Here I obtain value of textbox and based on it's value enable or disable the textbox
//Obtain a boolean value that I need to pass to Page.IsPostBack( ) method of Page_Load
ViewState["istempVar"] = aboolValue;
}
I am trying to access this ViewState variable in:
public void Page_Load(object sender, System.EventArgs e)
{
...
if (Page.IsPostBack )
{
// obtain ViewState["istempVar"]
}
Any help is appreciated.
Thanks.
|
|
|
|
|
tjkota wrote: I save to ViewState and access it from Page.IsPostBack( )
The LoadComplete event occurs after all postback data and view-state data is loaded into the page and all controls on the page. In order for view state to work for controls that are added dynamically, they must be added in or before the pre-render stage of the page life cycle.
|
|
|
|
|
Hi I am getting an error in my website that i dont understand.
The message is here on line 53 in web.config - I use similar assemblies previous to this in the file such as System.Web.Security.SqlMembershipProvider
and the type below can be called from .cs pages. Any ideas?
Thanks
Dan
Server Error in '/TraffordCentre' 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: The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
Source Error:
Line 51: connectionStringName="LocalSqlServer"
Line 52: applicationName="/"
Line 53: type="System.Web.Security.SqlRoleProvider,
Line 54: System.Web.Version=2.0.0.0, Culture=neutral,
|
|
|
|