I have a DTS job that is using the MSXML2.XMLHTTP3.0 object to generate a post request to an ASP.NET application. Under the covers, the ASP.NET application is using System.Reflection to acquire some assembly information and I receive the following exception:
System.Web.HttpException Error Code: -2147467259 Message Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the \ section in the application configuration.
DTS Job Code:
Dim objSvHTTP
Dim PostData
Set objSvHTTP = CreateObject("Msxml2.XMLHTTP.3.0")
objSvHTTP.open "POST", "http://www.mywebsite.com", false
objSvHTTP.send
If (objSvrHTTP.responseText = "") Then
//do something
Else
//do somethiing else
End If
ASP.NET Application Code:
string WebPath = "D:\mywebsite\bin\mywebsite.dll";
Assembly UI = Assembly.LoadFrom( @WebPath );
Type t = UI.GetType( "MyWebsite.BasePage" );
MethodInfo MyMethod = t.GetMethod( "MyMethod" );
object obj = Activator.CreateInstance(t);
MyMethod.Invoke( obj, null);
Question is, do I need to provide vaild Active Directory credentials in the XMLHTTP request to the ASP.NET application to avoid the error message