Showing posts with label form. Show all posts
Showing posts with label form. Show all posts

Friday, March 23, 2012

Error on VB Sample which is delivered by installation.

Hi,

after i try to build the web application "Web Development - Data Entry Form" i get the following error message. I already change the variable username to system which is defined in Machine.Config.

The Error messega is like following:
SQL Server does not exist or access denied.
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.Data.SqlClient.SqlException: SQL Server does not exist or access denied.

Thanks,The username you see in machine.config is most likely not the username you want to provide in the connection string in your application. You need to provide a valid username and password for your SQL server. If you did not install the db server yourself, you should be able to get valid login info from the person who installed it.

If the db server is local, you might be able to get away with the following for your connection string: "server=localhost;TrustedConnection=true;database=YOUR_DB"

Sunday, February 26, 2012

error message while retrieving table from database

well i have got a form which displays some result from the databasse, it runs fi9 in webmatrix, but when i try to run it from my main page and when i click on that button which should displays the aspx page, it gives me this error:

############################################################

Server Error in '/' Application.
------------------------

Login failed for user 'MUFADDAL\ASPNET'.
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.Data.SqlClient.SqlException: Login failed for user 'MUFADDAL\ASPNET'.

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:

[SqlException: Login failed for user 'MUFADDAL\ASPNET'.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +472
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
Microsoft.Matrix.Framework.Web.UI.SqlDataSourceControl.PopulateDataSet(DataSet dataSet, String listName) +494
Microsoft.Matrix.Framework.Web.UI.SqlDataSourceControl.GetDataSource(String listName) +51
Microsoft.Matrix.Framework.Web.UI.DataBoundControl.ResolveDataSource() +95
Microsoft.Matrix.Framework.Web.UI.DataBoundControl.DataBind() +59
Microsoft.Matrix.Framework.Web.UI.MxDataGrid.DataBind() +10
Microsoft.Matrix.Framework.Web.UI.MxDataGrid.OnPreRender(EventArgs e) +62
System.Web.UI.Control.PreRenderRecursiveInternal() +62
System.Web.UI.Control.PreRenderRecursiveInternal() +125
System.Web.UI.Control.PreRenderRecursiveInternal() +125
System.Web.UI.Page.ProcessRequestMain() +1489

------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

############################################################

i have kept no passwords in my mssql server 2000 database

can anyone help me out with this problemWeb Matrix runs as a normal application, and so runs under your user credentials. When run in IIS, you are running under different credentials (generally the user ASPNET on your machine).

Your connection string likely is using integrated securtiy (that is, you are not passing a SQL username and password). You must:

Add the 'MUFADDAL\ASPNET' user as a user in SQL Server (easy if SQL is on the same machine as the Web server, more difficult otherwise) or you could use SQL security and pass a username and password.|||i did create a user and gave him all of the permissions.
but still it is not working