Ive created a Silverlight application and im using WCF service to access my database. It works fine debugging in visual studio but when i deploy it to my iis i get an error trying to access my database. Im not sure if its something ive done wrong setting up the service or an database access problem.
my connection string:
<add name="database" connectionString="Data Source=(local)\SQLEXPRESS;Initial Catalog=Automationdev;Integrated Security=False;Pooling=False;User ID=Guest;Password=passwordz
my service:
service name="PublishedSoftwareSilverlight.Web.Service1"
endpoint address="" binding="customBinding"
bindingConfiguration="PublishedSoftwareSilverlight.Web.Service1.customBinding0"
contract="PublishedSoftwareSilverlight.Web.Service1"
endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
clientConfig:
endpoint address="http://localhost/SilverLight/Service1.svc"
binding="customBinding"
bindingConfiguration="CustomBinding_Service1" contract="ServiceReference1.Service1"
name="CustomBinding_Service1"
Someone please help....Thank you.
Error:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1;
Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR
3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; .NET4.0E) Timestamp: Sun, 26 May 2013 07:59:58 UTC
Message: Unhandled Error in Silverlight Application An exception
occurred during the operation, making the result invalid. Check
InnerException for exception details. at
System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
at
PublishedSoftwareSilverlight.ServiceReference1.AreaListCompletedEventArgs.get_Result()
at
PublishedSoftwareSilverlight.Models.ServiceInterface.client_AreaListCompleted(Object
sender, AreaListCompletedEventArgs e) at
PublishedSoftwareSilverlight.ServiceReference1.Service1Client.OnAreaListCompleted(Object
state) Line: 1 Char: 1 Code: 0
Related
On calling azure powershell cmdlet Login-AzureRmAccount I'm prompted to enter my email address. I do this and then the message "redirecting you to your organization's sign-page" appears. The sign-in page is then displayed with the error message:
•Activity ID: 33a3798c-1362-45ad-a03c-c6dcde5f55ff
•Relying party: Microsoft Office 365 Identity Platform
•Error time: Tue, 20 Mar 2018 11:16:25 GMT
•Cookie: enabled
•User agent string: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 10.0; Win64; x64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729)
Any ideas on how to diagnose what is happening here?
I have a third Party WCF service which I am able to call when my application is using IIS Express but when I host my application on Local IIS and calling to that WCF service it throws exception:
"A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond"
The service is also giving me result very quickly when I consume it from console application & SOAP UI
So what I think this is not a data related issue rather it is something related to IIS (version 10).
The issue comes up when I hosted my application on Local IIS
this is my config file
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IABCDPaymentService"/>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://XXXXXXXXXXXXXXXXXXXXX/Service.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IABCDPaymentService"
contract="BankServiceWCF.IABCDPaymentService" name="BasicHttpBinding_IABCDPaymentService" />
</client>
Looking for help on my issue.
Thanks!
The issue was that i was not able to consume it when i was using local IIS.So i found the solution and the problem was with administrative rights.when i provided the rights it works!
Getting this error:
HTTP Error 401.1 - Unauthorized
You do not have permission to view this directory or page using the credentials that you supplied.
I have successfully got Windows Authentication setup on my Windows 7 with IIS 7.5, just not on the test server (Windows Server 2008). Test server is within the network and I have access.
Things I have tried:
Turned on Windows feature, Windows Authentication
In IIS (7.0) Authentication, set Windows Authentication to enabled & Anonymous Authentication to disabled.
This is from the web.config file:
<system.web>
<compilation debug="true" targetFramework="4.5"/>
<httpRuntime />
<authentication mode="Windows" />
<authorization>
<allow users="MyDomain\SomeUser" />
<deny users="*" />
</authorization>
<pages controlRenderingCompatibilityVersion="4.0" />
</system.web>
I can't think figure this out. Any ideas?
As I mentioned above, when I publish and browse to that application on my windows 7 computer the application works without a user/pass popup. But if I publish and browse to the application on the test server (Windows Server 2008) I keep getting a user/pass popup.
Here is the strange thing, browsing to the application from the test server doesn't work. However, browsing to the application from my own computer (Windows 7) to the application which is published on the test server works ONLY after entering user/pass in the pop.
I still don't know why I can't browse to the application while on the test server. It is a virtual machine so maybe it recognized me as something unexpected when I am logged in.
I have a big problem with the Windows Phone 8 Emulator.
First I have an Azure project ,I have a WebRole this webrole expose some DomainServices (RIA Services) .
I exposed this DomainServices like SOAP, with others Apps like Windows 8 metro style or WPF app clients this services work fine.
But I trying to consume this services with Windows Phone 8 Emulator and I can't do that!.
I followed this article: How to connect to a local web service from the Windows Phone 8 emulator
I need to be more specific:
I have a website in a webRole of Windows Azure Project.
This website has a DomainServices (RIA Services) because I have a Silverlight Application inside.
I exposed this services with this.
<domainServices>
<endpoints>
<add name="Soap" type="Microsoft.ServiceModel.DomainServices.Hosting.SoapXmlEndpointFactory,
Microsoft.ServiceModel.DomainServices.Hosting, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</endpoints>
</domainServices>
I can consume this services with other apps. Windows metro Style and WPF and this services work fine.
Now, I want to develop a new application for Windows Phone 8 . But I need to consume this services.
In my local machine , I trying to connect this services with the emulator so, I researching and I found the emulator is a Virtual Machine and I need to configure IIS Express.
I followed this article How to connect to a local web service from the Windows Phone 8 emulator
But I can't connect my Services hosted in the webRole with Windows Phone 8 Emulator.
This is the structure of my Website Project:
This the configuration of my WebRole Called LandingPage this web role has the services.
This the configuration of IIS Express inside of Applicationhost.config.
<site name="LandingPage" id="2">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="E:\AnimesideFinal\AnimesideWebsite\LandingPage" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:24939:localhost" />
<binding protocol="http" bindingInformation="*:24939:192.168.2.114" />
</bindings>
</site>
This is the applications running in IIS Express is different of the Article.
Finally this is the Config of the service in the Windows Phone 8 emulator.
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_AuthenticationServiceSoap" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://192.168.2.114/Services/LandingPage-Services-AuthenticationService.svc/Soap"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_AuthenticationServiceSoap"
contract="AuthService.AuthenticationServiceSoap" name="BasicHttpBinding_AuthenticationServiceSoap" />
</client>
</system.serviceModel>
I followed all Steps of the article without results . I think something is wrong because I need to run my project from the Azure proj and in the properties of that exist the option to use IIS express or IIS web server.
And this is the error of Windows Phone Emulator.
{System.ServiceModel.CommunicationException: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned an error: NotFound. ---> System.Net.WebException: The remote server returned an error: NotFound.
at System.Net.Browser.ClientHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
at System.Net.Browser.ClientHttpWebRequest.<>c__DisplayClasse.b__d(Object sendState)
at System.Net.Browser.AsyncHelper.<>c__DisplayClass1.b__0(Object sendState)
--- End of inner exception stack trace ---
at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
at System.Net.Browser.ClientHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result)
--- End of inner exception stack trace ---
at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
at System.ServiceModel.ClientBase1.ChannelBase1.EndInvoke(String methodName, Object[] args, IAsyncResult result)
at AnimesideWP7.AuthService.AuthenticationServiceSoapClient.AuthenticationServiceSoapClientChannel.EndLogin(IAsyncResult result)
at AnimesideWP7.AuthService.AuthenticationServiceSoapClient.AnimesideWP7.AuthService.AuthenticationServiceSoap.EndLogin(IAsyncResult result)
at AnimesideWP7.AuthService.AuthenticationServiceSoapClient.OnEndLogin(IAsyncResult result)
at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)}
Thank you for your help .
Regards.
see the iis express solution section
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj684580(v=vs.105).aspx
I am out of ideas here, so I'm hoping someone can help. Here is what I've got:
A WCF service that only has a basicHttpBinding endpoint.
There is only a service interface, all other [DataMember], [FaultContract] are concrete types.
When I run it straight from Visual Studio (using WCF Test Client or my custom app) everything works (I send a request and get a response). This usually takes a second or two.
I published it to an IIS 6 server.
I can successfully open http://server/WebService/WebService.svc?WSDL
I can successfully open http://server/WebService/WebService.svc/mex (same output as above)
The WCF Test Client and my custom app can successfully add the service reference
Whenever I try to call a service method it waits for about 15 seconds and I get the dreaded "no meaningful reply" error.
I ran Fiddler and I got a 202 result, which would seem like a success.
It's not returning more than 65536 bytes
It's returning an array, but it is small
I tried remote debugging, but can't get that to work, probably due to a firewall (but port 80 is open, I can get the WSDL)
I enabled system.diagnostics, nothing.
I have an IErrorHandler which normally logs things, nothing.
Here's the endpoint config:
<endpoint address="" binding="basicHttpBinding" contract="Enterprise.IMyService" bindingNamespace="http://ourdomain.com/MyService/">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
Anything else I can try? It's probably a simple setting somewhere, but I can't figure it out.
Edit:
The raw fiddler response:
HTTP/1.1 202 Accepted
Date: Thu, 15 Apr 2010 19:02:45 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Length: 0
I figured it out! It had nothing to do with WCF. When I moved it to the server the database connection string was no longer valid. The error logging (to e-mail) configuration also was no longer valid and was eating the exception. It took 15 seconds to respond because that's how long the SQL server connection took to time out.