I have created a very simple wcf serivce and I am trying to use it in Agilepoint nx, but it is giving me this error:
Exception: AgilePoint.Workflow.DataSources.DynamicProxyException: There was an error in compiling the proxy code.
at AgilePoint.Workflow.DataSources.DataSourceDescriptorWCF.OpenWsdl(String urlStr, String domainName, String userName, String userPassword, Boolean isGenerateMessageContract, DynamicProxyFactory& _factory)
at AgilePoint.Workflow.DataSources.DataSourceDescriptorWCF.GetWCFBindingsAndEndpoints(String URL, Boolean generateMessageContract, String CustomDomainName, String CustomUserName, String CustomUserPassword)
at r.GetWCFBindingsAndEndpoints(String wcfServiceUrl, Boolean generateMsgContract, String credentials)
Compilation Errors:
error CS0009: Metadata file 'c:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Web.Services\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll' could not be opened -- 'An attempt was made to load a program with an incorrect format. '
Anyone any idea what could be causing this error?
I have changed the identity in app pool to: Localsystem, but it is not working.
Test your web service with wcftestclient or SoapUI.
Looks like you should enable 32bit apps in app-pool settings (if you are hosting service in IIS).
Related
I have a website (client) consuming the WCF service.
This is what the exception error returns when I run the website with the debugger:
ex {"Could not find a part of the path 'E:\\ORG_FILES\\Logs\\P_Log.txt'."} System.Exception {System.ServiceModel.FaultException<System.ServiceModel.ExceptionDetail>}
Inside the web service I have no double \:
String logPath = #"E:/ORG_FILES/Logs/P_Log.txt";
There can be one of the two cause for this error:
1.Path is not correct.
2.Account through which your application is running don't have rights to create directory at path location, like if you are trying to create directory on shared drive with not enough privileges etc.
You can try changing logPath:
string logPath = #"E:\ORG_FILES\Logs\P_Log.txt";
or
string logPath = "E:\\ORG_FILES\\Logs\\P_Log.txt";
I am trying to deploy the asp.net core Web API to the IIS. This application works perfectly fine on the Visual studio and also when I run the dll using the dotnet command. This application has the certificate for signing the JWT token. After deploying the application to IIS I am getting "HTTP Error 500.30 - ANCM In-Process Start Failure" and I checked the windows log and error message is
Host terminated unexpectedly.
Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException: The system cannot find the file specified.at Internal.Cryptography.Pal.CertificatePal.FilterPFXStore(Byte[] rawData, SafePasswordHandle password, PfxCertStoreFlags pfxCertStoreFlags)......
I checked the file path and file name everything is correct but some reason IIS is not able to load find the certificate file. Also, I checked the permission and it also looks good. Not sure why I am getting this error message
Also, I ran the same application dll file using the dotnet run command where IIS is pointing to but I am not getting any error. I am getting this error only after deployng to IIS.
On startup.cs file and configuration method I am getting error on this line.
var cert = new X509Certificate2("test_cert.pfx", pwdFrmVault);
I after searching for this error and googling, this solution worked for me. IIS Manager->application pool -> advanced settings ->Under Process model, Load User Profile to true. More detail on link
We have some old VB code on a server which is compiled and is making a web service call. The provider recently updated from TLS1.1 to TLS1.2 and that's when the code stopped working and we started getting the error message
Underlying connection was closed: an unexpected error occurred on a send
I am not very familiar with VB. Are there any changes we can make on the Windows Server so that the compiled code makes a connection via TLS1.2?
It took some time, but I've added the stack trace. I've edited it a bit for privacy:
Here is the error message:
The underlying connection was closed: An unexpected error occurred on a send.
Trace:
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at (...............).BeginSession(String Profile) in C:\Users...\Desktop.............................vb:line 146
at (................)RetrieveData(Int32 queueNumber) in C:\Users(..................................).vb:line 475
at (.................) in C:\Users(...................................)vb:line 121
Here's a part of the code where a webservice connection is made (line 146 in the stack above):
<System.Web.Services.Protocols.SoapDocumentMethodAttribute("......BeginSession", RequestNamespace:="........com", ResponseNamespace:=".............com", Use:=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)> _
Public Function BeginSession(ByVal Profile As String) As String
Dim results() As Object = Me.Invoke("BeginSession", New Object() {Profile})
Return CType(results(0), String)
End Function
Add this just before the request:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12
ServicePointManager.Expect100Continue = True
I think it should work then.
Worked for me, when I had an error, though a bit different one.
My issue was resolved.The steps I took was to upgrade the project by opening it in the latest version of Visual Studio (2017). I had a few errors upgrading mostly related to the solution file being read-only. I then changed the target framework of the project to 4.6.1.
After doing these changes and rebuilding the solution, the app seems to be working.
I got this message in server log:
PhantomJs server unable to complete HTTP requests, preventing C1 Function preview images from being generated.
Composite.Core.WebClient.BrowserRenderException: ERROR, page.onResourceTimeout: "Network timeout on resource.", URL: "http://tempvala/Composite/blank.aspx"
Request: .CMSAUTH_-1796214875_757602046,41A53DFC3B8F0A3FCEC9860340804062FDA6CECBD2DF57EDF765A3E495C56F518A1F9195D76BC80B9F58B8CC7884B44B06DF96CEAAFC30717BDF00A0D80C7D955C4B3A4A2880C8018726C093824B5B0599D841C96ECA0B93501535F7B364BDA7,tempvala|http://tempvala/Composite/blank.aspx|C:\Sites\PublicUpgrade42\App_Data\Composite\Cache\Temp\phantomtest.png|test
at Composite.Core.WebClient.BrowserRender.PhantomServer.RenderUrl(HttpCookie authenticationCookie, String url, String tempFilePath, String mode, String& output)
at Composite.Core.WebClient.BrowserRender.CheckServerAvailability(HttpContext context, HttpCookie authenticationCookie)
I dont know what to do about this, and cant find any answers on internet.
Any help will be much appreciated.
Are you testing the website from the same machine where the website is hosted?
If not, it is required to map the host name 'tempvala' to 127.0.0.1 on the machine where the website is hosted as well. Function preview is generated by PhantomJs that is making HTTP requests, it is possible that it is failing to resolve the host name.
I have a web service running on a client's server. When I access it through remote desktop on the server and type in the parameters, it works. When I access it from my computer and type in the parameters, it works. When I access it from my application on a handheld device connected to my computer, the web method throws
{System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException:
Server was unable to process request. ---> System.Data.OracleClient.OracleException:
ORA-12505: TNS:listener does not currently know of SID given in connect descriptor
The device is not connecting to the database, it just invokes the web service and passes parameters to it. I also created a test method that just returns the parameters to the device without connecting to the DB, and the parameters passed are fine.
This is driving me crazy, I have no idea how this is possible. Anyone got any ideas?
Edit: Work internet died and made the problem obvious. The problem is actually that my local dev version of the service is getting invoked from the device. I have no idea why. This is the code of the service constructor (derived from SoapHttpClientProtocol):
public Service1() {
this.Url = "LOCAL (WRONG) URL";
}
By executing this code:
server.Service1 s1 = new server.Service1();
s1.Url = "CLIENT (CORRECT) URL";
string test = s1.TestMethod(parameters);
After the first line, s1.Url is, of course, the wrong url. After the second line, s1.Url is the correct url. The third line however, connects to the wrong, development service! I only noticed this because my internet died and a connection to client's server should have failed, yet it kept working... Trying to figure out why this is happening.