Permission issue running Wpf application in Vista - wpf

I created a WPF Desktop application and have tried deploying it to vista without success. The application performs a scan and uploads the data to a web service on the internet. It should also log any exceptions using NLog to the hard drive. When I run the application it errors out when trying to send the data to the web service. If I run it as administrator it works fine. I have tried a number of things but nothing seems to work. Nlog doesn't log the exception so it's difficult to tell what is happening. Any direction would be greatly appreciated.

Adding a strong name to my application allowed it to be given full trust on the machine. This solved any issues getting to the external web service. Go here to learn how to sign your application.

Related

How to enable logs on the PC for web based applications

I access an ADF based application through the Web. The application suddenly goes blank and nothing is written in the server logs. For applications using jnlp or java applet we can enable java trace to find what exactly happened when the request was sent to the server. Is there any way we can get similar trace for this web based application?
Regards,
Sameer
ADF generates plenty of logging, but if you get an error and you can't see it in the logs - that developer's fault - bad code that swallows the errors.

SharePoint 2010 and Silverlight

We currently have a Silverlight application which is hosted in a SharePoint 2010 page. The Silverlight app makes web service calls to a another server on our domain, which has a clientaccesspolicy file in place. We are experiencing cross-domain issues in our production environment.
Users in the farm admin group can use the Silverlight application without any issues. However, all other users recieve the generic cross domain exception when they try to use this app. We have attached Fiddler to the process and noticed that the farm admins are served the clientaccesspolicy file, but that non-admin users are not. In fact, Fiddler does not ever show an attempt to load this file for non-admins.
This only happens in our production environment, which leads me to believe there is a web config or permission setting causing the issue. Unfortunately, I cannot find anything that backs this up.
Has anyone else run into this issue or know if such a setting exists?
See comments above. I had to change the URL to use the full machine name i.e. from webserver/service.svc to webserver.domain.com/service.svc. It solved the problem but doesn't answer the question about why the farm admins could access it. vorrtex's response is the best possible explanation I have seen so far.

System Security Exception in Silverlight app making GET request

I am new to silverlight. I have been trying to patch up a silverlight app that makes a get request to some site over the net, say google. However, I keep getting the system.security exception again nd again. I read various other posts and what i gathered is that for these things to work u need to choose HOST APPLICATION IN A NEW WEBSITE option while creation of the project, i have done that, but still get the same exception. I downloaded the app from http://www.shinedraw.com/data-handling/flash-vs-silverlight-simple-http-post-request/ and ran it by clicking debug in VS2010, still it gave the same exception.
Please tell me what i am doing wrong, i know its cross domain issues, but dont know what else to do.
The second answer at this post - WebClient.DownloadStringAsync throwing Security Exception in Silverlight, I think, offers a workaround, but does this means there is no way to access such services from silverlight directly?? -
Experienced users please explain.
You cannot call a web service other than from your own domain directly from a Silverlight application. If you want to to this, you would have to install a cross-domain policy on the server that hosts the service. But you can always install a web service within your own web application (that hosts the Sivlerlight app) and call the other service from that service. It's one sercie call more but it works also with services you don't own.

Using the EPiServer Communities API from a console app?

I'd like to write a console or winforms application that will interact with the EPiServer database. Since I don't want to muck about in the deep inards of the database I'd like to use the EPiServer API.
However, all the examples are using the "CommunitySystem.CurrentContext" which is null when running outside the website.
Now, I'm going to transfer a large amount of data from a legacy system to EpiServer Community and I really don't want to do that from a web page but from an application I have a little more control of.
Is there any way I can use the API from outside the web context?
I'm not that familiar with the community model. But... I've had no problems at all running huge imports through a web form (or control). The key (besides having disabled execution and database timeouts) has been to run it through Internet Explorer on the site's server and have the site's domain name mapped to 127.0.0.1 in the HOSTS-file. It can run for hours and hours while logging progress to a table or text-file before sending the response.
My colleague Jarle figured out the last bits and blogged the whole process here So if you want to run the EPiServer API outside of IIS, that's the place to start. Works like a charm!

App on IsolatedStorage with ClickOnce won't start

I have created an application that can save data both local drive and isolated storage. Then I have tested it by deploying via ClickOnce with FullTrust. This worked correctly, but when I set it to PartialTrust (Internet zone), the application cannot start up.
How to solve this problem?
I have tried to create empty form Windows application and then deploy using PartialTrust, it still errors when I run the application.
ClickOnce applications do not need full trust permissions to write to isolated storage. However, applications do need full trust for regular file I/O. So I'm guessing that your application will have to request full trust to work.
However, I'm not sure why your empty application won't work with partial trust. What error message do you get?
Are you using the SaveFileDialog? From memory, this throws a UIPermission exception for a partial-trust ClickOnce app deployed from the Internet zone. If that's what is happening, you need to change your app deployment to request this specific permission.
UPDATE: If you do a debug build, the exception stack trace will give the line number that caused the security exception.

Resources