Error with com object RRS feed

  • Question

  • User1660186342 posted

    I have a classic ASP app which I am now trying to run on IIS7 with SQL 2005. The app has certain com objects.

    I am having a problem with a com object that tries to do a date conversion.

    Here is the code:

    If intPropertyId = "0" Or instr(1, intPropertyId, ",") > 0 Then
     blnSingleProperty = False
     sngPropOffset = objDateI18NFormatHelper.GetPropertyOffset(cstr(intPropertyId), cstr(con))
     blnSingleProperty = true
     sngPropOffset = objDateI18NFormatHelper.GetPropertyOffset(cstr(intPropertyId), cstr(con))
    end if

     I get the following error when trying to run the asp page.

     Microsoft Active Server Pages error '800a0065'

    [GetPropertyOffset] Invalid authorization specification

    /diary/daily_dairy.asp, line 57

    I think it has to do with permissions. Any help would be appreciated.

    Monday, July 16, 2007 7:34 AM

All replies

  • User209782248 posted


    I've seen similar issues a while ago, and they usually have to do with your database connection string or account that your database logic is running under when it makes the connection.  Sometimes, adding "Trusted_Connection=yes" to the connection string solves this problem.

    First, does this same app work on Windows Server 2003?

    By default, ASP code impersonates the anonymous user.   If you configured a different anonymous user in WS2003, you may need to do so again in IIS7 for it to work.  If the COM object you call reverts impersonation before making the database call, then you need to make sure that the applicaiton pool identity (if you set a custom identity) has access to your SQL Server, or if you dont change the apppool identity, the machine account has access to it (Network Service will manifest as the machine account when connecting to Sql Server).

    You may also be able to monitor whether your application succesfully connects to the server at the Sql Server, and possibly even get a log of authentication failures there that will shed more light on the problem.  I am not 100% sure on how to do the latter, but you own the sql server, you can try googling for it.


    Mike Volodarsky

    Program Manager
    IIS Core Server
    Visit mvolo.com for more inside information on IIS7, IIS and ASP.NET

    Tuesday, July 17, 2007 3:26 PM
  • User1660186342 posted

    Hi Mike

    Thanks for the response.

    It works fine with server 2003. I only have the problem on a vista machine with IIS7. The sql connection strings are fine as other parts of the app connects to the SQL server and validates without a problem.

    It is a only a certain com object that does not seem to work. What I am looking for is some clarification on that error code so that I have a place to start.



    Tuesday, July 17, 2007 4:57 PM
  • User209782248 posted

    The error is an OleDb error code, usually having to do with permissions or the way your connection string is structured.  You can get a feel for different situations by googling for "Invalid authorization specification".  You'll see that sometimes the behavior is different on different platforms.

    I'll ask someone on the SQL team to take a look as well.



    Tuesday, July 17, 2007 8:14 PM
  • User209782248 posted
    This is the answer from the ADO team:

    It is raised when connection string did not use Integrated security *and* didn’t provide a user id. It could be related to bad database and language name as well.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
    <o:p> </o:p>Could you ask the customer for the connection string?

    The COM object may be using an invalid connection string / one that is different from the rest of the application.  Do you have access to its code?


    Wednesday, July 18, 2007 4:14 AM
  • User1660186342 posted

    Hi Mike

    I use an includes file which has the connection string. This works file for all the other parts except for this particular COM object.

    The authentication is mixed mode.



    Wednesday, July 18, 2007 7:45 AM
  • User1660186342 posted

    Hi Mike

    Does IIS7 have an utility like authdiag that can help in trouble shooting ?



    Wednesday, July 18, 2007 9:47 AM
  • User209782248 posted

    Can you show your connection string (you can change the pwds/addresses if you dont want to show them)?

    It is also possible that your COM object somehow modifies the connection string / uses an ABO option that causes this issue with the connection.  My guess is that the COM object sets some of the connection properties that cause this issue.  This could include the database name, and language. 

    You can use the SQL query monitor to see what queries are being made against your db - I am not sure whether it will show a failed authentication attempt, but you should give it a try.  Debug break your app right before you call the comobject, step over the call, and see what happens on the server side.

    Also, check out http://msdn.microsoft.com/en-us/library/aa964124.aspx to see how you may be able to trace the connection.

    You can also try SQL messageboards to see if they have any advice.



    Thursday, July 19, 2007 10:18 PM
  • User1660186342 posted

    Here is the connection strings

    Dim isMtrNoUsed
    Dim con,strCon,strReptURL
    Dim strReportUser, strReportPassword,strReportDSN,strReportDataBase
    Set con = Server.CreateObject("ADODB.Connection")

    strCon="PROVIDER=sqloledb;DATA SOURCE=LAPTOP\SQLEXPRESS;UID=rdz;pwd=password123;database=meetings"

    con.Open strCon
    strReportDSN = "meetings"
    strReportDataBase = "meetings"
    strReportUser = "rdz"
    strReportPassword = "password123"

    Friday, July 20, 2007 3:28 AM
  • User1440742651 posted

    I have a solution to this problem

    Windows Vista / 7 / 2008 does not like you converting the connection string to a string 


     sngPropOffset = objDateI18NFormatHelper.GetPropertyOffset(cstr(intPropertyId), cstr(con))


     sngPropOffset = objDateI18NFormatHelper.GetPropertyOffset(cstr(intPropertyId), con)


    Friday, August 19, 2011 7:02 AM