how to Check if file(html) exist in clientbin - silverlight-4.0

how to check that html file exist in clientbin or in other folder in silverlight 4
in-browser application

Silverlight application is client side application. You can check only URL accessibility or write a web service that provide this information to your application

Related

give iis application rights to system folder

I'm using the same components to access some dll in windows\system32. When I do it from exe, it works. However, when I am doing it from an IIS application, it fails - I do not know exactly what the error is because I am using third party components.
Do I have set up the IIS WCF Application in a specific way to access the dll in windows\system32? I tried to explicitly enter the user with which the physical path was access but it did not help...
Im not sure the giving IIS the rights is the way to go.
I would split the application into two parts:
1: A windows service hosting the components that need the special access, exposing an endpoint towards the IIS web app.
2: The the web app , that will call the service to get the work done.

Web Service Reference not working in Windows Service application

Mine is Windows Service project. But I've to use a web service in it which is working fine in Web application when I refer it.So I tried to add the web reference into my Windows Service project. It added fine. But the DISC file and wsdl file not being displayed. And also I was not able to use the webservice class reference in my application.
Any solution for accessing that web service in Windows Service app? Or I've to do anything else to make it work

Referencing a Published WCF Service

I have followed "Walkthrough: Creating and Accessing WCF Services" from http://msdn.microsoft.com/en-us/library/bb386386.aspx to create a WCF Service Library. I tested it in WCF Test Client. Then in another desktop application (let's call it A) that eventually I would like to use this WCF I added the Service Reference that WCF Test Client gives
http://localhost:8733/...
and that worked too.
Now, I am in the process of publishing and using the published version's service reference. Here is what I did, I published the WCF Service Library by
right-clicking the solution
Choosing Publish
clicking ...
Choosing File System and typing
\mywebaddress.example.com\wwwroot\myWCFService
Looks like the publish is successful, because by navigating to
\\mywebaddress.example.com\wwwroot\myWCFService
in a file browser, I see that Web.config, .svc and bin folder are created.
Now, I am trying to refer to this published version from my desktop application A. I am not certain what options I'm supposed to choose
Here is what I have tried:
Choose Add Service Reference in the desktop application A,
I tried
\mywebaddress.example.com\wwwroot\myWCFService
in the Address field of Add Service Reference, Pressed Go and received the error An error (Details) occurred while attempting to find services at
\\mywebaddress.example.com\wwwroot\myWCFService.
When clicking on Details, I get There was an error downloading
\\mywebaddress.example.com\wwwroot\myWCFService
Access to the path
\\mywebaddress.example.com\wwwroot\myWCFService
is denied.
If the service is defined in the current solution, try building the solution and adding the service reference again.
Alternatively, I tried Advanced option from Add Service Reference and from there Add Web Reference... and in the URL field typed
http://www.example.com/myWCFService/
then when pressing the arrow button I get 401 - Unauthorized: Access is denied due to invalid credentials.
You do not have permission to view this directory or page using the credentials that you supplied. and in the Web services found at this URL: Value cannot be null. Parameter name: discoveryError & mexError.
Th latter error was when in the IIS setting I had Anonymous Authentication Disabled. After enabling Anonymous Authentication the error becomes:
403 - Forbidden: Access is denied.
You do not have permission to view this directory or page using the credentials that you supplied.
Web services found at this URL: There was an error downloading
http://www.example.com/wcfservice/_vti_bin/ListData.svc/$metadata
The request failed with HTTP status 404: Not Found.
When I just now published a WCF Service Library project with Visual Studio 2013, I was offered the options for file system, Local IIS, and FTP Site. When I choose "Local IIS", it shows me both IIS Express and my local full IIS.
I just published to IIS by selecting "Default Web Site" and clicking the "Create Web Application" button in the tooolbar. I named the application, clicked "Open", then clicked "Publish" on the main publish dialog.
This published a bin folder with the service DLL and other libraries it needed, a web.config, and a .svc file. I was able to browse to the .svc file with no problem. I was even able to add it as a service reference to another project.
If you are always going to host your services in IIS, and if you don't need to keep a clean separation of layers (perhaps you're only writing a few, simple services), then I recommend you use the "WCF Service Application" template instead. This creates a Web project in which to host the services, as well as the .svc and .cs files necessary for the services themselves. That's more like the only option that was available for ASMX web services.

Adding .svc file missing

I need to add a .svc file to WCF Service Library I have added to a solution (This doesn't have the .svc file). If I specify this file through ad new item (eg test.svc), this is an installer file not the WCF file.
How can I add this file to my project?
Thanks
You cannot add a .svc file to a WCF service library - you need to add the WCF service file to a ASP.NET web site or ASP.NET web application in your solution.
In a web application or web site, you can right click on the project, choose "Add New Item", and then pick "WCF Service" from the dialog. This will add the necessary .svc file to your web site or web app.
The svc file must to be in a web app/web site as a container - it cannot reside in a WCF service library.
Marc
Just right click on sub folders and select "convert to Application"

Publishing a Silverlight with reference to a WCF

I created a RoleService in my silverlight project and through that got hold of the embership/Role functionality. I am running this on a local machine and is wondering how to publish this to my website. I have 3 web applications:
My main web application where the silverlight object shoule be merged into
The silverlight project which lets me develop the silverlight application
The silverlight host application which I use for testing
In the web application (1) i have made the RoleService so that i can get a hold on my Roles. In the Silverlight application (2) I have a service reference to the service mentioned above which I consume and loads my Role data. This howecer doesnt work when i publich it online. But how do i get it to work online?
Is it because it is trying to connect to service with wrong address? If so, then you just need to propagate WCF service address to your Silverlight application through hosting web.config and start connecting to a correct service.
Let me know if this is the case, then I will share exact solution for this.