I have a Silvleright Bussiness Application Silverlight_BussApp.
It has the Silverlight_BussApp project and the Silverlight_BussApp.Web project.
I need to open a notepad after populating it in the code behind on a button click event.
I cannot make this an out of browser application.
So since silvlight does not allow me to do it, i created a WCF Service in the Silverlight_BussApp.Web project
and invoked it through a proxy in the Silverlight Project. This works fine.
The code in the WCF Service is:
public void openFileWithNotepad(string filename)
{
try
{
if (File.Exists(filename))
{
Process.Start("notepad.exe", filename);
}
else
{
MessageBox.Show(
"I was unable to locate the following file: " + filename,
"File Not Found");
}
}
catch (Exception e)
{
throw e;
}
}
Now i need to use this openFile functionality in more than one Silverlight Project.
So i created a WCF service and hosted it on the IIS, created a proxy in the Silverlight project and
to my dismay the file does not open and it keeps giving me the "File Not Found" Error.
Can somebody help me figure out how i can make this a reusable fucntionality for all my Silverlight Projects.
Why is it when i use hte same code in a WCF Service hosted on a IIS does not work while it works prefectly
when hosted in the same solution of the silverlight project.