Showing posts with label Configuration. Show all posts
Showing posts with label Configuration. Show all posts

Friday, February 8, 2013

Custom Errors Web config

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:

Sunday, May 22, 2011

Enable DTC

1. Enable DTC in Component Services
Configure network access for the Distributed Transaction Coordinator

- 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”.

2. Setup Firewall Rules/Exceptions for DTC
Enable the Distributed Transaction Coordinator rules (inbound and outbound) in the Windows Firewall

- Open Window Firewall with Advanced Security
- In Inbound Rules enable the 3 rules for DTC
- In Outbound Rules enable the 1 rule for DTC

3. Configure Port Range 5000-5100
From http://goo.gl/z0Ye7

- 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.

4. Name resolution

- 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

Wednesday, November 26, 2008

Webservices - Upload a file

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

Monday, August 4, 2008

Machine key settings - web.config

Machine key settings in between system.web

< 
machineKey 
validation="SHA1"
decryption="AES"
validationKey="06B52A1252C98B3EC549F1AC96C881F07EAA4FA9261BF1844E5997FA64FD2A6503808B00FE6E79D18F559E92825AA0CE802575A0E02814DB6EDBEDFA6C8623CC"
decryptionKey="ABAA84D7EC4BB56D75D217CECFFB9628809BDB8BF91CFCD64568A145BE59719F"/ >

Recomended:

validationKey 128 char-length value for SHA1
decryptionKey 64 char-length value for AES

Wednesday, November 28, 2007

Variables in web.config

Web.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"];