Wednesday, October 26, 2011

System.InvalidOperationException: Cannot load the X.509 certificate identity specified in the configuration.

For this error,


here is a simple solution:

Make sure the following line is present for each Identity in the App.config file:


Something like this:



AddressAlreadyInUseException HTTP could not register URL http://+: Another application has already registered this URL with HTTP.SYS.


If you get this error when running a WCFServiceHost here is what you have to do:

1. Stop Debugging.
2. Go to the ServiceLibrary project -> right-click -> Properties -> uncheck the option Start WCF Service Host when debugging another project in the same solution.



3. Save.
4. Press F5 to Start Debugging again.

=> the error should not occur anymore.



Monday, October 24, 2011

F8 key to boot in Safe Mode with Networking

If your machine bluescreens and you can't start it or you need to enter Safe Mode for any other reason here is what you need to do:

1. Restart the machine;
2. Quickly press F8 to get into the Advanced Boot Options menu. It should look like this:


3. Select Safe Mode or, my favorite, Safe Mode with Networking;
4. Press Enter.


=> your computer will start in safe mode.

Tuesday, October 18, 2011

Registering and unregistering .DLL files


Open Command prompt and type: 


1. Register file:
regsvr32 <filename>.dll
or
regsvr32 <path>\<filename>.dll
where <path> is the path to the file, and <filename> is the name of the file.

2. Unregister file:
regsvr32 -u <filename>.dll
or
regsvr32 -u <path>\<filename>.dll
where <path> is the path to the file, and <filename> is the name of the file.

Friday, October 7, 2011

Install SMTP server on 2003 R2

Simple and fast way to create a SMTP server on a 2003 server.




1. Go to Control Panel -> Add or Remove Programs -> Add/Remove Windows Components -> Application Server -> Details -> Internet Information Services (IIS) -> Details -> check SMTP Service -> OK.



2. Go to Start -> Administrative Tools -> Internet Information Services (IIS) Manager -> expand server -> Right click on Default SMTP Virtual Server -> Properties -> Access -> Relay… -> select All except the list below -> OK -> Apply -> OK.



3. Test the server:
Send a manual email through telnet to confirm everything working successfully. (Telnet is also installed from Server Manager -> Add Features).

- Open Command Prompt and type: 
telnet localhost 25 (Enter key)
HELO (Enter key)
mail from: anyuser@anymailserver.com (Enter key)
rcpt to: anotheruser@anymailserver.com (Enter key)
data (Enter key)
mail test (Enter key) . (Enter key)

=> "Queued mail for delivery" message should be displayed. 

Monday, October 3, 2011

Monday, September 26, 2011

Enable remote connections for SQL Server 2005 Express


To enable remote connections for SQL Server 2005 follow these steps:


1. Click Start -> Programs -> Microsoft SQL Server 2005 -> Configuration Tools -> SQL Server Surface Area Configuration.

2. Click on Surface Area Configuration for Services and Connections.


3. On the Surface Area Configuration for Services and Connections page -> Database Engine -> Remote Connections -> Local and remote connections -> click the appropriate protocol to enable for your environment -> Apply -> Ok. 



4. On the Surface Area Configuration for Services and Connections page -> Database Engine -> Service -> Stop -> wait until the MSSQLSERVER service stops -> Start to restart the MSSQLSERVER service.


5. On the Surface Area Configuration for Services and Connections page -> SQL Server Browser ->  Service -> Start to start the  SQLBrowser service.



6. Connect from remote machine using SQL Management Studio or SQL Server Profiler according to your needs.



Note: Also check your firewall!