Generic Runtime Error (unknown error with no description or clue of what just happened):
Add the following custom errors element to web.config (inside system.web):
< customErrors mode="Off"/ >
Now more information will be displayed:
- Open Component Services.
- Expand Component Services > Computers > My Computer > Distributed Transaction Coordinator.
- Right click on “Local DTC” and select “Properties”.
- In the “Security” tab, enable the checkboxes for “Network DTC Access”, “Allow Remote Clients”, “Allow Remote Administration”, “Allow Inbound”, “Allow Outbound”, “Enable XA Transactions” and “Enable SNA LU 6.2 Transactions”. Change the radio button to “No Authentication Required”, and make sure that the DTC Logon Account is “NT AUTHORITY\NETWORK SERVICE”.
- Open Window Firewall with Advanced Security
- In Inbound Rules enable the 3 rules for DTC
- In Outbound Rules enable the 1 rule for DTC
- Open Component Services.
- Expand the Component Services node.
- Expand the Computers node.
- Right-click My Computer and press Properties.
- Select the Default Protocols tab.
- Select Connection-oriented TCP/IP and press the Properties button.
- Press the Add button.
- Type the port range 5000-5100 into the Port range box, and press OK.
- Ensure that the Port range assignment and Default dynamic port allocation options are set to Internet range.
- Press OK, and OK again.
- Shutdown and restart your computer.
- Add an entry in the Hosts file in the MachineA with the ip address and name of MachineB
- Add an entry in the Hosts file in the MachineB with the ip address and name of MachineA
3 things to consider
1. In web.config
< httpRuntime maxRequestLength="10240" executionTimeout="300"/ >
2. In the client application
MyWebService ws = new MyWebService(); ws.Timeout = 300*1000;
3. In IIS (not tested)
HTTP Keep-Alives Enabled Connection Timeout: xyz seconds
Machine key settings in between system.web
< machineKey validation="SHA1" decryption="AES" validationKey="06B52A1252C98B3EC549F1AC96C881F07EAA4FA9261BF1844E5997FA64FD2A6503808B00FE6E79D18F559E92825AA0CE802575A0E02814DB6EDBEDFA6C8623CC" decryptionKey="ABAA84D7EC4BB56D75D217CECFFB9628809BDB8BF91CFCD64568A145BE59719F"/ >
Recomended:
validationKey 128 char-length value for SHA1Web.config
< ?xml version="1.0"?> ... < appSettings> < add key="SiteUrl" value="http://dev.site.com/sales"/ > < add key="ListName" value="Shared Documents"/ > < /appSettings> ... < /system.web > < /configuration >
Some.aspx.cs
using System.Configuration; string siteUrl = ConfigurationManager.AppSettings["SiteUrl"]; string listName = ConfigurationManager.AppSettings["ListName"];