473,385 Members | 1,642 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Server.CreateObject call from IIS fails against interop c# object

I have created an object in c# that produces script for a legacy ASP page.
Next, I created a setup project and installed it on the server. When I run
a page that accesses it from the server, I get the following error:

Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
/.... myPage.asp line 275
800401f3

I am able to create a desktop VB6 client and instantiate the object
interactively by using CreateObject( Progid ). But it's under IIS that it
consistently fails. I set the directory settings of the DLL to full rights
for everyone at the OS level thinking it might be security related.

Any ideas?
Thanks,
-Steve

Nov 16 '05 #1
2 4504
Steve,

In order to do this, you have to set the ASPCompat flag at the top of
your page to true. This sets the apartment model of the thread that your
page is processed on so that it can run COM objects. Doing this in an
ASP.NET environment incurs a performance penalty though, and should be
avoided.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Steve H" <sh*****@synchrono.com> wrote in message
news:u1**************@TK2MSFTNGP09.phx.gbl...
I have created an object in c# that produces script for a legacy ASP page.
Next, I created a setup project and installed it on the server. When I run a page that accesses it from the server, I get the following error:

Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
/.... myPage.asp line 275
800401f3

I am able to create a desktop VB6 client and instantiate the object
interactively by using CreateObject( Progid ). But it's under IIS that it
consistently fails. I set the directory settings of the DLL to full rights
for everyone at the OS level thinking it might be security related.

Any ideas?
Thanks,
-Steve

Nov 16 '05 #2
Hi Nicholas,

Thanks for the prompt reply.

The ASPCompat option is only available on ASP.NET pages, and I am calling
the C#/ComInterop component from an ASP page. Sorry I wasn't more clear on
this. Could it be related to the COM threading model declared by the
C#/ComInterop component (ThreadingModel = Both under the InProcServer32
entry in the registry)? I thought the Com Runtime would resolve this by
itself.

Thanks again,
-Steve

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:uJ**************@TK2MSFTNGP10.phx.gbl...
Steve,

In order to do this, you have to set the ASPCompat flag at the top of
your page to true. This sets the apartment model of the thread that your
page is processed on so that it can run COM objects. Doing this in an
ASP.NET environment incurs a performance penalty though, and should be
avoided.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Steve H" <sh*****@synchrono.com> wrote in message
news:u1**************@TK2MSFTNGP09.phx.gbl...
I have created an object in c# that produces script for a legacy ASP page. Next, I created a setup project and installed it on the server. When I

run
a page that accesses it from the server, I get the following error:

Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
/.... myPage.asp line 275
800401f3

I am able to create a desktop VB6 client and instantiate the object
interactively by using CreateObject( Progid ). But it's under IIS that it consistently fails. I set the directory settings of the DLL to full rights for everyone at the OS level thinking it might be security related.

Any ideas?
Thanks,
-Steve


Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: karen | last post by:
Hi all : this is going to be a long post. So i apologize in advance :) i am converting a java program in VB right now. I am a java programmer by trade. so i am no expert in this department. I...
5
by: Nate | last post by:
We are attempting to make a request to a web service (we will refer to it as XXXServices) hosted on a Web Logic server from a C# SOAP client. The server responds with a 401 Unauthorized error...
6
by: Jack | last post by:
I have the following asp script which I am trying to run against sql server. <HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"> <TITLE>Chapter 12 - Command...
14
by: Marcus | last post by:
I have a function that simply returns TRUE if it can connect to a particular Sql Server 2005 express, or FALSE if it cannot. I am getting some strange error codes returned when the computer that...
7
by: Kath | last post by:
Hi, I hope this is the most relevant newsgroup for this post. I have a VB.NET app that uses the MapPoint component, and in my app I use pushpins to display/retrieve GPS locations....
7
by: dlasusa | last post by:
Sorry if this is the wrong group...I THINK I got to the right place...(oh...and I'm a newbie programmer...so please be gentle) Anyway I have a program that works fine when I run it from within...
7
by: thisis | last post by:
Hi All, i have this.asp page: <script type="text/vbscript"> Function Body_Onload() ' create the object Set obj = Server.CreateObject("UploadImage.cTest") ' use method of the object...
3
by: Simon | last post by:
Hi All, I'm hoping someone will have some words of wisdom for me regarding MS Clustering on Windows 2003. I have a service that runs on a cluster. During invocation it's supposed to...
12
by: Light | last post by:
Hi all, I posted this question in the sqlserver.newusers group but I am not getting any response there so I am going to try it on the fine folks here:). I inherited some legacy ASP codes in my...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.