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

No comments:

Post a Comment