Showing posts with label struggling. Show all posts
Showing posts with label struggling. Show all posts

Sunday, February 12, 2012

Connection Problems

Hi,

I am new to SQL Server 2005 but have a pretty good understanding of 2000, but I am struggling with connections! I have created a .Net Windows application (installed on an XP box) that should talk to a SQL Server 2005 database which is installed on a 2003 server. The desktop app is installed is in one domain (DOM1), and the SQL server 2005 is in another domain (DOM2). I have created a active directory user in DOM2 which will be a service account which manages the connections between the app and the db. I am using the following connection string:-

Server=ZZLUKGKK1M1J\INST2005;Database=PublicationWizard;User ID=DOM2\zzPubWizardDBUser;Password=password;Network Library=DBMSSOCN;Trusted_Connection=False;

When I try and connect an error is thrown, and I get the following in the SQL log

Error: 18456, Severity: 14, State: 5.

Login failed for user 'DOM2\zzPubWizardDBUser'. [CLIENT: 10.80.150.121]

I know that the user name and password are correct and that it exists with the DOM2 domain. I have also included "Network Library=DBMSSOCN" as I was getting problems with it trying to connect via Named Pipes. As I am really used to SQL Server 2000 I might be missing something obvious but I cannot for the life of me figure this out.

Any suggestions will be most welcome as this is driving me nuts

by setting trusted_connection=false you are implying you wish to use SQL Authentication not Windows. Thus your user must be created on the destination sql server and sql authentication must be enabled on the server itself.

Friday, February 10, 2012

Connection problem SQL Server 2005

After searching the Internet and this forum a still have a question.

I'm struggling already a few days with the following problem

I created a site in VS2005 on a virtual directory (http://server01/test) on a local network app server with also SQL 2005 installed.

The problem seems to occur with the SQL server. When I open the site somewhere within my local network it all works fine.

It's should however also be accessibly from a public ip address. When I access a normal html/aspx page without any SQL content behind it works ok from outside, but when I try to access a page with SQL content it just hangs (time out). In the profiler of SQL server I see that it's accessing the table to get the content with the correct SQL userid. I checked the settings of SQL server and "remote connections" is allowed and named pipes is enabled.

Any help where to investigate further would be appreciated!

<configurationxmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

<appSettings/>

<connectionStrings>

<addname="testConnectionString"connectionString="Data Source=SERVER01;Initial Catalog=database_name;User ID=User_;Password=Pass_;Encrypt=False;Context Connection=False" providerName="System.Data.SqlClient" />

</connectionStrings>

<system.web>

</system.web>

Are you sure you want to connect to SQL Server with named pipes protocol? Then make sure from the client machine you can pass the Windows Authentication on the SQL server machine. In command prompt execute the following commands to test IPC sharing:

net view\\servername

net use\\servername\IPC$

|||

No i'm not wan't to connect via named pipes, but just was out off idea's so tried everything.
SQL works fine now via remote, but seems that i have another issue now. Don't think it in the right place now in this forum but maybe you have an answer.

As i mentioned everything works fine via the local network, but when i try to access the pages from an outside connection (public IP adress) i got strange errors.

2006-05-14 10:33:56 W3SVC1 192.168.1.6 GET /bo - 80 - 192.168.1.10 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.1;+SV1;+.NET+CLR+1.1.4322;+.NET+CLR+1.0.3705;+InfoPath.1;+.NET+CLR+2.0.50727) 301 0 0
2006-05-14 10:33:59 W3SVC1 192.168.1.6 GET /bo/default.aspx - 80 - 192.168.1.10 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.1;+SV1;+.NET+CLR+1.1.4322;+.NET+CLR+1.0.3705;+InfoPath.1;+.NET+CLR+2.0.50727) 200 0 0
2006-05-14 10:33:59 W3SVC1 192.168.1.6 GET /bo/css/lightbox.css - 80 - 192.168.1.10 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.1;+SV1;+.NET+CLR+1.1.4322;+.NET+CLR+1.0.3705;+InfoPath.1;+.NET+CLR+2.0.50727) 200 0 0
2006-05-14 10:33:59 W3SVC1 192.168.1.6 GET /bo/images/5.jpg - 80 - 192.168.1.10 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.1;+SV1;+.NET+CLR+1.1.4322;+.NET+CLR+1.0.3705;+InfoPath.1;+.NET+CLR+2.0.50727) 200 0 0
2006-05-14 10:33:59 W3SVC1 192.168.1.6 GET /bo/css/site.css - 80 - 192.168.1.10 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.1;+SV1;+.NET+CLR+1.1.4322;+.NET+CLR+1.0.3705;+InfoPath.1;+.NET+CLR+2.0.50727) 200 0 0
2006-05-14 10:33:59 W3SVC1 192.168.1.6 GET /bo/images/back.gif - 80 - 192.168.1.10 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.1;+SV1;+.NET+CLR+1.1.4322;+.NET+CLR+1.0.3705;+InfoPath.1;+.NET+CLR+2.0.50727) 200 0 0
2006-05-14 10:34:09 W3SVC1 192.168.1.6 GET /bo - 80 - 134.146.0.6 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.0;+.NET+CLR+1.1.4322) 301 0 0
2006-05-14 10:34:37 W3SVC1 192.168.1.6 GET /bo/default.aspx - 80 - 134.146.0.6 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.0;+.NET+CLR+1.1.4322) 200 0 1236
2006-05-14 10:34:41 W3SVC1 192.168.1.6 GET /bo/images/5.jpg - 80 - 134.146.0.6 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.0;+.NET+CLR+1.1.4322) 200 0 64
2006-05-14 10:35:01 W3SVC1 192.168.1.6 GET /bo/images/5.jpg - 80 - 134.146.0.6 Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.0;+.NET+CLR+1.1.4322) 200 0 64

When i look in the Network Monitor log i see the from the local network i get a response to client "HTTP/1.1status code = 305 - Not modified"

But remote IP request get an: "HTTP/1.1status code = 206 - Partial Content" when the try to open a page with images (jpg /gif)

|||Sorry I have no idea on your new issue, and I think you'd better post the new issue to some other forum such asHttpHandlers and HttpModules