About creating PDF - asp-classic

In classic Asp, I have installed ABCpdf8.dll for creating PDF, but I am getting an error.
Microsoft VBScript runtime error '800a01ad'.
ActiveX component can't create object.
What should I do?

The two most likely possibilities are that you haven't actually registered ABCpdf.dll on your server, or that the IUSR account associated with your website doesn't have read/execute permission on ABCpdf.dll
Your error message suggests that you are using CreateObject() rather than Server.CreateObject() - which would give you a different message - "Server.CreateObject Failed". Take a look at this question about another third party component - the issues are the same.
Server object error 'ASP 0177 : 800401f3' Server.CreateObject Failed

If the problem is the component ABCpdf8, you can use an PHP lib (as mpdf) for create the PDF, group the informations in an variable HTML and send to PHP page with MSXML2.ServerXMLHTTP.

Related

Error adding web reference to project

I need to add web reference to ASP.NET project, but unfortunately I got error:
There was an error downloading 'http://isapi.somehost.com/soapclient/soapclient.php?URL=http://isapi.mekashron.com/SmartHD/MekashronTV.dll%2Fwsdl%2FISmartHD/_vti_bin/ListData.svc/$metadata'.
The request failed with the error message:
--
object(SoapFault)#3 (9) {
["message":protected]=>
strin
Is there any ways to fix it?
Can you post the exact exception you got to help you further.
But couple of initial thoughts.
ASP.NEt is not able to get the WSDL to generate a proxy class. You ight need to check permissions.
If it is WCF service try to add service reference.
Thanks

Error when webservice file included in my project

In my project, I included Webservice files, when I tried to run, I got this error in Chrome browser.
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0029: Cannot implicitly convert type 'Unified.WebService.GetOrder [c:\Users\Venkatesh\AppData\Local\Temp\Temporary ASP.NET Files\root\417f2571\29df25a\assembly\dl3\1f05470e\0779ccf4_47dfcd01_0\WasteManagement.DLL]' to 'Unified.WebService.GetOrder [c:\Users\Venkatesh\Desktop\Venkateshwar\Company Related\Waste Management - Copy\WasteManagement\WasteManagement\App_Code\GetOrder.cs(8)]'
Source Error:
Line 43: public GetOrder retrieveOrder(string orderNumber)
Line 44: {
//Calling Web service method in my class
Line 45:/*ERROR*/ return connection.getOrder(orderNumber);
Line 46: }
Line 47:
When I clicked Compiler Warning Messages, it is showing error in all the connections which were through Web service.
If necessary, I will share the code too. (As I am new to asp.net, I cant understand which part of code to share. So, please mention which part of code you want, if needed.)
Your Web-service should be independent project in your solution. After that you should add Web Reference for it, and after that you can safely call it.
Web Service is not a basic class you cann add and use - it is a different thing, so you can't simply add it to your App_Code folder to make it work.
From MSDN:
Web service discovery is the process by which a client locates a Web service and obtains its service description. The process of Web service discovery in Visual Studio involves interrogating a Web site following a predetermined algorithm. The goal of the process is to locate the service description, which is an XML document that uses the Web Services Description Language (WSDL).
The service description describes what services are available and how to interact with those services. Without a service description, it is impossible to programmatically interact with a Web service.
Edit:
Yes, you can remove [WebMethod] attributes, etc, from web service declaration, and temporary use it like class, but after that you still have to add a Web reference for it to use it like Web Service.

Server.CreateObject Failed with chiliupload component

I get the following error with a legacy asp application that I have been asked to help out with.
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
/site_manager/image_upload.asp, line 27
800401f3
The line ofcode that throws the error is shown below:
Set fbase = Server.CreateObject("chili.upload.1")
As you ahve probably guessed oldschool asp isn't my strong point but from the research I have done it seems as if a component hasn't been registered on the server (I only have FTP access).
What component needs to be regsistered?
Thanks for the help...
You're missing the registration of the DLL that creates the chili.upload.1 object. Are you trying to run this on a Linux machine?
You need to register the Sun Chili!Soft ASP components. Here's the manual on this from 2003:
http://ns7.webmasters.com/caspdoc/html/running_the_setup_program_sun_chili_soft_asp_for_windows.htm. Note that this only works if you still have the original setup. Otherwise you're out of luck. Sun Chili!Soft ASP is no longer available and very, very dead.
If you're just interested in file upload functionality on ASP, I can recommend Free ASP Upload. It requires no registration of any components and generally works. I can also recommend this article on the topic of ASP uploads. If you're willing to shell out some money there are hundreds of components that do the same thing too.
Register the DLL on your computer, and then do this:
Locate and then click the following registry subkey:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\
FeatureControl\FEATURE_IGNORE_ZONES_INITIALIZATION_FAILURE_KB945701
Note If the FEATURE_IGNORE_ZONES_INITIALIZATION_FAILURE_KB945701 subkey does not exist, you must manually create it. If you're using a 64 bit OS, you may need to use HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\ FeatureControl\FEATURE_IGNORE_ZONES_INITIALIZATION_FAILURE_KB945701 instead
Right-click FEATURE_IGNORE_ZONES_INITIALIZATION_FAILURE_KB945701,
point to New, and then click DWORD Value
Type w3wp.exe to name the new registry entry, and then press ENTER.
Right-click w3wp.exe, and then click Modify.
In the Value data box, type 1, and then click OK.
After setting this registry key, a simple app pool restart will apply the change. No longer will your .NET COM components randomly stop working with no real solution except shuffling application pools!

asp.net web service, Error Generating XML Document

I've created an asp.net web service and am trying to test it using my client. The web method I'm currently testing returns a custom object named GetAllTicketsSinceLastPullDateResult, which contains one ArrayList of custom clsTrip objects, and a custom object called FaultResponse. This is how I'm using my client:
ServiceReference1.ServiceSoapClient myClient = new ServiceReference1.ServiceSoapClient();
ServiceReference1.GetAllTicketsSinceLastPullDateResult result = new ServiceReference1.GetAllTicketsSinceLastPullDateResult();
result = myClient.getAllTicketsSinceLastPullDate(myUser);
But I get the following error:
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.InvalidOperationException: There was an error generating the XML document. ---> System.InvalidOperationException: The type clsTicket was not expected. Use the XmlInclude or SoapInclude attribute to specify types that are not known statically.
I Google the error and most of the answers I find have to do with serializing derived classes. But my clsTicket class is not a derived class. What can be causing this error? How do I use XmlInclude or SoapInclude?
Thanks in advance!
Okay I finally got it to work, I ended up putting the following line:
[XmlInclude(typeof(clsTicket))]
Between [WebMethod] and my method's definition. So far so good.
I don't think you need to 'new' result:
ServiceReference1.GetAllTicketsSinceLastPullDateResult result;
result = myClient.getAllTicketsSinceLastPullDate(myUser);
Also, how do you know the error isn't on the server?
Can you call the function with a web browser?
Have you updated your service since initially adding the reference to your project? If you're using Visual Studio's "Add Web Reference" feature and you update the service, often times there is a configuration or parameter chance, which can generate SOAP errors.
Try right clicking on the Web Service in question through visual studio and select "Update" option. Recompile the app and see if that resolves your issue.

Stuck on an ASP.NET/WCF WSDL Parsing Error

I have a WCF Web Service that my ASP.NET app uses. It has been working fine for quite some time.
I just added in a Dev Express Grid (and the Dev Express DLLs) and a new page that uses them and now I am getting parsing errors on the WSDL.
But the weird part is that it works fine on my machine but fails on the web server machine. (Both are connecting to the same web services WSDL.)
Here is the error message I am getting:
Server Error in '/MyWebAppWebDev' Application.
--------------------------------------------------------------------------------
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Reference.svcmap: Failed to generate code for the service reference 'MyWebAppService'.
Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter
Error: Referenced type 'WebClientApp.MyWebAppService.ReferenceUpdatesDataContract, WebClientApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' with data contract name 'ReferenceUpdatesDataContract' in namespace 'http://schemas.datacontract.org/2004/07/MyWebAppServiceLibrary.DataContracts' cannot be used since it does not match imported DataContract. Need to exclude this type from referenced types.
XPath to Error Source: //wsdl:definitions[#targetNamespace='http://tempuri.org/']/wsdl:portType[#name='IMyWebAppReferenceDataServiceLib']
Cannot import wsdl:binding
Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.
XPath to wsdl:portType: //wsdl:definitions[#targetNamespace='http://tempuri.org/']/wsdl:portType[#name='IMyWebAppReferenceDataServiceLib']
XPath to Error Source: //wsdl:definitions[#targetNamespace='http://tempuri.org/']/wsdl:binding[#name='MyWebAppServicesDefaultEndpoint']
Cannot import wsdl:port
Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.
XPath to wsdl:binding: //wsdl:definitions[#targetNamespace='http://tempuri.org/']/wsdl:binding[#name='MyWebAppServicesDefaultEndpoint']
XPath to Error Source: //wsdl:definitions[#targetNamespace='http://tempuri.org/']/wsdl:service[#name='MyWebAppReferenceDataServiceLib']/wsdl:port[#name='MyWebAppServicesDefaultEndpoint']
Source Error:
[No relevant source lines]
Source File: /MyWebAppWebDev/App_WebReferences/MyWebAppService/ Line: 1
I am completely stumped on this. I have checked my web.config endpoint address and it is spot on (and notably is not in the error message above).
Any ideas would be welcomed.
Things I have tried:
Giving permissions to C:\Windows\temp to my Website user name
Giving permissions to C:\Windows\temp to my App pool user name
Checking to see that none of my data contracts are generic and have IsReference=true in them.
Are you running Skype? Seems like something is already using up a port for that web site, try browsing the site in a web browser to confirm.

Resources