Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 27th, 2007, 12:50 PM
Authorized User
 
Join Date: Feb 2007
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to toddw607 Send a message via Yahoo to toddw607
Default From SQL Server to Internet Explorer

Hi Everyone!
     I'm trying to use ASP.Net to access a SQL Server 2000 database through internet explorer using the asp file
<%
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "DSN=t"
objConn.Open
%>

     I have my DSN set to my local server which uses Windows authentication to access the database but when I try to run the asp file I get the following error:
      Error Type:
Microsoft OLE DB Provider for SQL Server (0x80040E4D)
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
/SQLtoXML/connectionTemplate2.asp, line 3

       I know it is a very broad error but any thoughts would help. Thanks!

 
Old March 27th, 2007, 01:10 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

First question, while this code will compile in ASP.NET, are you sure you arent using classic??

Second, this could be a couple of reasons. 1 you haven't set the application directory up in IIS for integrated windows authentication AND you are allowing anon access to the application. What does your web.config look like and how is your application setup in IIS?

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
 
Old March 27th, 2007, 01:33 PM
Authorized User
 
Join Date: Feb 2007
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to toddw607 Send a message via Yahoo to toddw607
Default

How would I know if I am using classic? All I have been trying to do is pullit up through IE by typing out the path with the asp file being placed in another file located on the local host.
  I have checked the app directory in IIS and did ensure that integrated windows authentication has been enabled. I'm really new to ASP and am really not sure what needs to be done just yet. Would it matter if I am using notepad to write the code and placing .asp as the extension?

 
Old March 27th, 2007, 01:41 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Ok. If your files have .asp extension they are Classic ASP pages. In so far as Notepad is concerened no it does not matter that you are using it, albeit, it is a bit tiedious.

In IIS, on the same tab that contains the check box for Integrated Windows Authentication, do you have the box checked that is associated with Anon logins? If you do, uncheck it.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
 
Old March 27th, 2007, 03:25 PM
Authorized User
 
Join Date: Feb 2007
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to toddw607 Send a message via Yahoo to toddw607
Default

Thanks for your response! I did what you told me to do and I get the same error. I have ASP.NET located in VB 8 and I would much rather use that than simply .asp files constructed in Notepad. Any simple tutorials to learn how to create a simple application in ASP.NET that you know of? I greatly appreciate your help!

 
Old March 27th, 2007, 03:49 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

One is not like the other in that ASP is much different then .NET.

First about your original problem, show me your DSN.

Second you may also want to check out
http://www.connectionstrings.com/?carrier=sqlserver

Third, read this article on impersonation
http://support.microsoft.com/kb/248187

Lastly Wrox publishes some great book on .NET, specifically this one seems geared to what you want to learn how to do:
http://www.wrox.com/WileyCDA/WroxTit...471781347.html

You can also check out these following resources
www.asp.net
www.asp101.com
www.4guysfromrolla.com

One of the Wrox Authors also maintains an informative site
http://imar.spaanjaars.com/

hth.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
 
Old March 27th, 2007, 03:56 PM
Authorized User
 
Join Date: Feb 2007
Posts: 88
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to toddw607 Send a message via Yahoo to toddw607
Default

Cool, thanks alot for all the information.

 
Old March 27th, 2007, 03:57 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

No problem.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
automate Internet Explorer server side with asp steven_blade Classic ASP Components 2 March 20th, 2007 04:04 AM
Internet Explorer cannot open the internet site cathiec ASP.NET 2.0 Basics 1 October 22nd, 2005 01:30 PM
Programming Internet Explorer using C# zjg_xian@msn.com C# 2005 0 August 10th, 2005 04:02 AM
Internet Explorer JelfMaria VB How-To 10 April 27th, 2005 03:58 PM
Closing Internet Explorer mahulda ASP.NET 1.0 and 1.1 Basics 1 April 7th, 2004 08:25 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.