I'm trying to send a push notification through WCF Restful web service to iOS using PushSharp. When I deploy my codes to the shared host, I get the following error.
The server encountered an error processing the request. The exception
message is 'Request for the permission of type System.Security.Permissions.FileIOPermission,
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.'. See server logs for more details.
I'm sure my certificate file and password is OK because I can send notification in localhost.
I think the reason of that error is the trust level. However, I cannot change my trust level to medium on web.config file, the host does not allow that.
How can I give the necessary permission?
Related
We have a client that connects to a web service (service1.svc) with the URL https:\destination.domain\Service1.svc. This web service connects to a second web service (service2.asmx) with the URL https:\localhost.domain\service2.asmx. Both service are hosted on the same webserver. The DNS on the Domain controller sets destination.domain to point to the IP of webserver and localshost.domain to 127.0.0.1. The application pool account is a global service managed account that is configured to allow delegation and is called webserveraccount. The application pool is configured to use the appPoolIdentity.
We see a 401 autherisation error connecting to the second webservice (service2.asmx). I have also see the a KDC_ERR_BADOPTION which makes me this our SPN configuration is incorrect. What would the correct format for SPN in the above scenario? Or is this not a kerberos related issue?
How to make Sitecore use non-SSL after an SSL ADFS proxy login?
We have a Sitecore site that uses ADFS (Active Directory Federated Services) to login to a common ADFS proxy and get a ADFS token. This site is in SSL but when returned back to the calling page the page, it is remaining in SSL and when trying to access a non-ssl page we get an error message:
Server Error in '/' Application.
Key not valid for use in specified state.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Security.Cryptography.CryptographicException: Key not valid for use in specified state.
note: we use this on other non-Sitecore sites and they do not return in SSL to calling page.
I am trying to call a WCF web service from my .net application which is a web api. I get the error below:
The HTTP request was forbidden with client authentication scheme 'Anonymous'. ---> System.Net.WebException: The remote server returned an error: (403) Forbidden.
This error is seen until I open IE on the same server where my web api is hosted through IIS, and then I browse to the WCF service URL, it prompts me with the certificate name that I have for the WCF service in my trusted certificate store. Once I click OK on the certificate popup in IE, it goes successfully to the wsdl of the service. After that if I make a call from my webapi it proceeds successfully. But every day it fails until I do that. I know there is something wrong with my certificate setup, but I am not sure how to fix it. Any help is appreciated.
Required Authorization for executing application, which I am not sure what I need to put
Popped up message: The server localhost is asking for username and password.The server reports that it is from spring.
Warning: Your username and password will be sent using basic authentication on a connection that is not secure
You should add security.basic.enabled=false in application.properties file and put it under src/main/resources path.
I have a web app running on Server A that calls a WCF service (K2 Workflow) on Server B that requires impersonation/delegation to run as the calling user. If I run the web app from Server A, the app works great. If I run the app from my local PC in debug, it also works great. If I hit the app from a browser on my PC to Server A, I get the following error:
The HTTP request is unauthorized with client authentication scheme 'Ntlm'. The authentication header received from the server was 'Ntlm,Negotiate'. System.Net.WebException: The remote server returned an error: (401) Unauthorized. at System.Net.HttpWebRequest.GetResponse() at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout).
I use the following code to run the service:
SvcWorklist.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Delegation;
SvcWorklist.ClientCredentials.Windows.ClientCredential = System.Net.CredentialCache.DefaultNetworkCredentials;
I feel like I've done everything, here is a list of what I've tried:
Setup a SPN (including port) with by Server A App pool domain user to Server B
(NETBIOS and FQDN)
Set the same domain user as the app pool user on Server A and B
Ensure the app pool user is allowed to delegate in Active directory
Ensure both servers are allowed to delegate in AD
Set authentication to windows and impersonate=true in web.config on Server A
Ensured Thread.CurrentPrincipal.Identity.Name has my user ID
Ensured IIS is set for windows and impersonation
Tried restricting the IIS configuration on server A and B to only Ntlm and/or Negotiate
Any help or ideas are truly appreciated.
For the dude who had the same issue - I figured it out. I had the SPN set on the target service, not the service it's hosting. I also needed to set sharepoint to use negotiate versus ntlm.