• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Trouble Connecting to SQL Server

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I\'ve been through the set up guide for SQL Server connections but my SQL Server is reporting the following errors continuously and Logic Monitor is retrieving no data.

01/10/2012 15:52:24,Logon,Unknown,Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. [CLIENT: 194.83.78.12]

01/10/2012 15:52:24,Logon,Unknown,Error: 18452, Severity: 14, State: 1.

01/10/2012 15:52:24,Logon,Unknown,SSPI handshake failed with error code 0x80090308, state 14 while establishing a connection with integrated security; the connection has been closed. Reason: AcceptSecurityContext failed. The Windows error code indicates the cause of failure. [CLIENT: 194.83.78.12].

01/10/2012 15:52:24,Logon,Unknown,Error: 17806, Severity: 20, State: 14.


The user accounts are all able to connect directly to the SQL Server instances. I use account in ASPHostPortal.com

Can you point me in the right direction please?

Thanks

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Requirements
Visual Studio 2015 Update 3
ASP.NET 4.5.2
SQL Server
If you want to connect to the SQL database into ASP.NET, using C#, it should follow the steps given below.

Step 1
Now, Open Visual Studio 2015 Update 3, go to the File >> New >> Project or use the shortcut key "Ctrl+Shift +N".
Step 2
Here, select Visual C# >> Web >> ASP.NET Web Application. Finally, click "OK" button.
Step 3
Here, you can select the template for your ASP.NET Application. We are choosing "Empty" here. Now, click OK button.
Step 4
Now, open the project and look for the Solution Explorer. Then open the default .aspx. If you want a Webform, you can add the page (Web Form). Add+New item (Ctrl+Shift+A). Now, we can create a login page, using ASP.NET code. You need to follow the drag and drop method. Here, we already created the login page.

Step 5
Now, open the project. If you want a SQL Server database, you can add the page (SQL Server database). Add+New item (Ctrl+Shift+A).
Here, you can select Visual C# and choose SQL Server database. Afterwards, click "OK" button.
open the new Window and click YES button.
Now, add this to the database in our project.

Step 6
Now, we can go to the Server Explorer and add your database. You can click the Tables and afterwards, click Add New Table.
Now, open the new table and you can fill the data, which is like (studentname, password) and afterwards, you click the Update . Then click database in update and subsequently click update the database, the database is updated.
we can click on the right click and click Show Table Data.Now, the data is stored.

Step 7
Now, you can add SQL Data Source. Drag and drop method. Here, click Configure Data Source
you can select the ConnectionString and Click NEXT button, we can choose Specify columns from a table or view and afterwards, click Next button.
Now, click Test Query.Here, add the data and click Finish button.

Step 8

Now, you can go to CS(C# code) page and you will write the C# code, you can see the Loginpage.aspx code.

Step 9
Here, you need to run any Browser and after a few minutes, you will get some output. Now, we can insert the data into your database.

Step 10
Now, we can added the GridView. Drag and drop method needs to be used. Then you can choose the data source, it is sqlDataSource.the database data is added to GridView.

Step 11
Here, you need to run any Browser and after a few minutes, you will get an output. Now, we can view the data.
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic