Showing posts with label aspnet. Show all posts
Showing posts with label aspnet. Show all posts

Friday, March 23, 2012

I cant execute my asp.net application with IIS 5.0

Hi,

please i have a problem, i can't execute my asp.net application with IIS 5.0?

i have a message indicating that MYSERVER\ASPNET can't connect, and that arrive when trying connect to the database under SQL Server 2000.

you have to know that my application work very well with webserver of WebMatrix.

Web Matrix Project : version 0.6

.Net Framework 1.1

Thank you.

Is the server a domain controller? If so, there are no local users, so the MYSERVER\ASPNET user will not exist. If it's not a DC, have you verified that the account exisits in SQL for the ASPNET user?

Monday, March 19, 2012

I cannot connect to SQLSERVER Database

In SQLserver Admin, ANDON\ASPNET is setup as a 'Server Admin'

****************************************************************************

Connection string is set in the web.config file.

<configuration>

<connectionStrings>

<add name="SqlServerEx"

connectionString="Data Source=LOCALHOST\SQLEXPRESS;Initial Catalog=DB2;Integrated Security=SSPI;"

providerName="System.Data.SqlClient;"></add>

</connectionStrings>

<appSettings/>

<system.web>

.......................................................................

protected void Button2_Click(object sender, EventArgs e)

{

string connStr = WebConfigurationManager.ConnectionStrings["SqlServerEx"].ConnectionString;

SqlConnection con = new SqlConnection(connStr);

TextBox3.Text = connStr;

try

{

con.Open();

TextBox2.Text = "<b> Server Verison::</b>" + con.ServerVersion;

TextBox2.Text += "<br /><B>Connection Is::</B> " + con.State.ToString();

}

catch (Exception err)

{

TextBox2.Text = "Error reading Database. ";

TextBox2.Text += err.Message;

}

finally

{

con.Close();

TextBox2.Text += "<BR><B>CONNECTION::" + con.State.ToString() + "</B>";

}

}

****************************************************************************

This is the error message I am getting:

"Error reading Database. Instance failure."

Do you have a SQL Server Express instance installed on Localhost ? Are remote connections enabled on the machine (See the Screencast on my site for more information about that) Please post the stakc of the exception (should be a SQLExeption) and the erronumber, error message and state here.

Jens K. Suessmeyer

http://www.sqlserver2005.de

I cannot connect to SQLSERVER Database

In SQLserver Admin, ANDON\ASPNET is setup as a 'Server Admin'

****************************************************************************

Connection string is set in the web.config file.

<configuration>

<connectionStrings>

<add name="SqlServerEx"

connectionString="Data Source=LOCALHOST\SQLEXPRESS;Initial Catalog=DB2;Integrated Security=SSPI;"

providerName="System.Data.SqlClient;"></add>

</connectionStrings>

<appSettings/>

<system.web>

.......................................................................

protected void Button2_Click(object sender, EventArgs e)

{

string connStr = WebConfigurationManager.ConnectionStrings["SqlServerEx"].ConnectionString;

SqlConnection con = new SqlConnection(connStr);

TextBox3.Text = connStr;

try

{

con.Open();

TextBox2.Text = "<b> Server Verison::</b>" + con.ServerVersion;

TextBox2.Text += "<br /><B>Connection Is::</B> " + con.State.ToString();

}

catch (Exception err)

{

TextBox2.Text = "Error reading Database. ";

TextBox2.Text += err.Message;

}

finally

{

con.Close();

TextBox2.Text += "<BR><B>CONNECTION::" + con.State.ToString() + "</B>";

}

}

****************************************************************************

This is the error message I am getting:

"Error reading Database. Instance failure."

Do you have a SQL Server Express instance installed on Localhost ? Are remote connections enabled on the machine (See the Screencast on my site for more information about that) Please post the stakc of the exception (should be a SQLExeption) and the erronumber, error message and state here.

Jens K. Suessmeyer

http://www.sqlserver2005.de

Monday, March 12, 2012

i can not access to database

Login failed for user 'FAMILY\ASPNET'.

this is the error message when i connect to database, FAMILY is my computer name.

my connection string is: "Data Source=localhost;Integrated Security=SSPI;Initial Catalog=forum"

You will need to configure access on your database for the ASPNET account that is used to run your ASP.NET applications.

To do this, launch SQL Server Management Studio (or Management Studio Express), expand the Security item until you see the Logins node, right click on it and choose New Login...

In the resulting dialog, select the ASPNET account. You will then need to configure the database to allow access for that user (expand the database tree to find the db, check out the Security > Users and Security > Roles for more information).

Note that it is tempting to simply add the ASPNET account to the Administrators group on the machine, as Administrators tends to get full access to the db. Avoid doing this: it's not a great security option.

|||i've got it. thanks a lot

Friday, March 9, 2012

i am a beginner, who have an example for operate the DataBase(Sql Server) in Asp.net(C#)?

i am a beginner, who have an example for operate the DataBase(Sql Server) in Asp.net(C#)?http://www.dotnetjunkies.com/quickstart/aspplus/doc/webdataaccess.aspx