Tuesday, October 12, 2010

Named Pipes Provider, error: 40 - Could not open a connection to SQL Server

Reference: http://social.msdn.microsoft.com/Forums/en-US/sqldataaccess/thread/c488cf76-2515-440f-b3f8-9cfad689c5b6

The error is reported by client library. While your server is listeing on remote TCP, client will still try TCP and NP connection in order. So the error client behavior is expected. From what you have described, I believe that even though you enabled the remote TCP connection on the XPSP2 machine, you didn't make the TCP listening port an exception of XPSP2 personal firewall. You should follow steps below to resolve this issue.



1. check the SQL Server Errorlog to make sure SQL Server is now listening on TCP/IP and confirm which port it is listening on. Usually 1433. In the Errorlog, you will see several lines that discuss what SQL Server is listening on. Below is an example:

2006-01-04 01:41:07.65 server SQL server listening on 10.254.1.150: 1433. <--Shows the IP Address and the port.

2006-01-04 01:41:07.65 server SQL server listening on 127.0.0.1: 1433. <--Shows another IP Address and the port.

2006-01-04 01:41:07.69 server SQL server listening on TCP, Shared Memory, Named Pipes.

2006-01-04 01:41:07.69 server SQL Server is ready for client connections

2, Make sure on Windows XP that the firewall is not blocking that port.

3, go to your client machine and run the client network configuration tool (cliconfg.exe) Make sure TCP/IP is enabled, click properties and make sure the port number is the same one as SQL Server is listening on. Here you can enable NP or disable client NP as well.

Once both the client and the server are using TCP/IP with the same port number and the firewall on server machines is not blocked, you should be able to connect.

Tuesday, October 5, 2010

country bar codes

00-13: USA & Canada 20-29: In-Store Functions 30-37: France
40-44: Germany 45: Japan (also 49) 46: Russian Federation
471: Taiwan 474: Estonia 475: Latvia
477: Lithuania 479: Sri Lanka 480: Philippines
482: Ukraine 484: Moldova 485: Armenia
486: Georgia 487: Kazakhstan 489: Hong Kong
49: Japan (JAN-13) 50: United Kingdom 520: Greece
528: Lebanon 529: Cyprus 531: Macedonia
535: Malta 539: Ireland 54: Belgium &
Luxembourg
560: Portugal 569: Iceland 57: Denmark
590: Poland 594: Romania 599: Hungary
600 & 601: South
Africa
609: Mauritius 611: Morocco
613: Algeria 619: Tunisia 622: Egypt
625: Jordan 626: Iran 64: Finland
690-692: China 70: Norway 729: Israel
73: Sweden 740: Guatemala 741: El Salvador
742: Honduras 743: Nicaragua 744: Costa Rica
746: Dominican Republic 750: Mexico 759: Venezuela
76: Switzerland 770: Colombia 773: Uruguay
775: Peru 777: Bolivia 779: Argentina
780: Chile 784: Paraguay 785: Peru
786: Ecuador 789: Brazil 80 - 83: Italy
84: Spain 850: Cuba 858: Slovakia
859: Czech Republic 860: Yugoslavia 869: Turkey
87: Netherlands 880: South Korea 885: Thailand
888: Singapore 890: India 893: Vietnam
899: Indonesia 90 & 91: Austria 93: Australia
94: New Zealand 955: Malaysia 977: International
Standard Serial Number for Periodicals (ISSN)
978: International
Standard Book Numbering (ISBN)
979: International
Standard Music Number (ISMN)
980: Refund receipts
981 & 982: Common
Currency Coupons
99:
Coupons

Monday, October 4, 2010

Sharepoint: Hide "Open with Windows Explorer" option

To remove the “Open with Windows Explorer” option across the entire site:
- Create a custom .ascx file containing only the “ToolbarActionsMenu” Sharepoint rendering template.
- Remove the SharePoint:MenuItemTemplate ID=”OpenInExplorer” node.
- Save the file to C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES and restart IIS, changes will be refreshed.

Wednesday, September 22, 2010

using Railo to run .cfm (coldfusion) files on IIS7 Windows Server 2003

Awesome blog post from http://www.mikesaysmeh.com/. All of the contents below are extracted from the original article here: http://www.mikesaysmeh.com/windows-2008-railo-iis-7

First, download Railo server. Go here http://www.getrailo.org/index.cfm/download and scroll down, then download the exe under Railo server.


Run the installer, I chose to install in C:\Railo to keep things really simple.

After it’s installed try http://localhost:8600/railo-context/admin/server.cfm on the server.
Don’t set anything up yet or add DSNs. I’m not sure if this is true but the admin is different for each site. At least I found that if I added a DSN under localhost it would not show up for the site. More on that later …

Open IIS and add a script mapping to your handler mappings.

Script: *.cfm
DLL: C:\Railo\win32\isapi_srun.dll
Name: CFviaRailo

Within handler mappings click on edit feature permissions from the right hand side and allow EXE. This is bad for the whole server so I recommend doing it on the sites individually.

If you are using Windows 2008 R2 x64 make sure the application pool for the site is set to allow 32bit apps and also set it to no managed code.

Open resin.conf in C:\Railo\conf. Find the line:
<!– configures a deployment directory for virtual hosts –>


Above that line put the following.
<!– configure IIS sites routing by host –>
<host id=”your-domain-name.com” root-directory=”.”>
<web-app id=”/” document-directory=”C:/inetpub/wwwroot/file-path”/>
</host>

Do the same for any other sites that will run Railo. Restart IIS (cmd –> iisreset) and the Railo server in services.

Now, in a web browser open the Railo admin under that site. Hopefully everything works for you. The URL would be “http://your-domain.com/railo-context/admin/server.cfm. You should be asked to set an admin password. After you do that and login add your datasources, setup the mail server, turn off debugging, and any other settings you like. With all that done your site should run as long as it doesn’t require something Railo doesn’t offer.

Like I said this is very basic and I did this for some relatively simple websites. I’m not sure if this is correct or recommended.Keep in mind that Resin is the web server, it is running the Railo sites and the CFML. IIS is simply passing the cfml to resin/railo. Just like normal CF/Java.

Some other links that helped me.

http://blog.durhamcons.com/post.cfm/railo-3-0-community-resin-3-1-and-iis6-learn-from-my-mistakes

http://www.railo.ch/blog/index.cfm/2009/6/24/h2Configuring-Railo-for-the-application-server–Part-1h2

Wednesday, September 1, 2010

Server running on 64-bit or 32-bit?

Microsoft Windows Server 2003

Method 1
1. Click Start, click Run, type sysdm.cpl, and then click OK.
2. Click the General tab. The operating system appears as follows:
• For a 64-bit version operating system: Microsoft Windows Server 2003 Enterprise x64 Edition appears under System.
• For a 32-bit version operating system: Microsoft Windows Server 2003 Enterprise Edition appears under System.

Method 2
1. Click Start, click Run, type winmsd.exe, and then click OK.
2. In the details pane, locate Processor under Item. Note the value.
• If the value that corresponds to Processor starts with x86, the computer is running a 32-bit version of the Windows operating system.
• If the value that corresponds to Processor starts with EM64T or ia64, the computer is running a 64-bit version of the Windows operating system.

Note: - Intel Itanium-based computers can only run 64-bit versions of Windows. Intel Itanium-based computers cannot run a 32-bit Windows operating system. Currently, 64-bit versions of Windows only run on Itanium-based computers and AMD64-based computers.
Related Posts Plugin for WordPress, Blogger...