C# Smart-client deployment is not working? - c#

I haven't deployed a smart-client in a very long time, so I may be doing something wrong. My publish works well, and the app works for me (could be cached?), but my users can't run the app and instead get this error:
Can't reach this page
Make sure the web address XXXXX is correct
Also, when I browse the page from the server, IE briefly starts like the app is going to run, but then nothing ever comes up. The default document is set correctly.
The app works perfectly locally, so I am sure it is an IIS setup issue.
I am just not sure where to go with this. Can anyone offer a suggestion for troubleshooting steps?

The problem is that my organization (actually, the parent organization over my organization) had decided to block the port I was using. After I convinced them to open the port, all worked as expected.

Related

Run c# code on client side or make a web session interactive?

I'm making an application on c# for signing PDFs. Its works perfectly on my visual studio web project, but when I publish it on my test server it throws me this Error
In this case I'm trying to execute the code that sign a pdf on the server and the error occurs specifically on the line:
System.Security.Cryptography.Pkcs.SignedCms.ComputeSignature()
It is supposed to throws a window on your desktop asking for your certificate (reading a smart Card) and then asking for your PIN just like this
Windows Security Window but I have the hunch that it's not possible because Its implies that the server have to have the possibility to interact with the client's desktop
Ok, now that I've explained all the enviroment that I'm facing, here are the solutions I've tried until now:
1) Trying to correct the Server Error above: I went in the server to IIS>application Pool>MyPage>Advanced Settings>Process Model>Load User Profile and selected True instead of False (Didn't Work)
2) Still trying to correct the Server Error I Went to Computer Management>Services and Application>Services and turned on the service "Interactive Service Detection" (Still not working and doesn't work even if I do the same on the client computer)
3)Finally, I guess that it's not possible to run the code on the server because the Error line above is a native calling of Windows Security so I thought: what if I try to run the code right from the client?. Like a c# applet equivalent or something, well... there are two ways for do that: ActiveX (old technology) and Silverlight (newer). The thing is that I just can't make a simple Silverlight program start on chrome, it does on firefox and IE but if doesn't work on chrome is a totally waste so my last option is to make it run with an ActiveX, and there is almost none useful information in the internet about that
If someone can tell me what to do, either to correct the error or to make my program run from the client side, I would be so grateful
You can't call the system's api from a Web client as this would break the sandbox. If you must use that system call, create a wrapper on the server that will handle the popup, although this would be a very "hacky" solution. You should really be asking why I am trying to use a Web client interface if I must use said native system call.

C# MVC app on Azure: Site works fine when freshly deployed but fails after being left idle

I have spent a good bit of time researching this but have not found anybody else reporting the issue that I am having.
I deploy my site and everything is good. I share the link with my QA and UI peeps and everything works for them. But if the site goes for a period of time, such as overnight, without being accessed then the web application is unable to start and reports "Method 'get_CurrentUser' in type ... does not have an implementation." Stopping and restarting the site does not resolve the issue but if I simply re-upload the main .dll file (the exact same version of the .dll) to the site then everything works fine again. For a while, at any rate.
Why would it be okay when newly published but fail after sitting for some time? Any suggestions on troubleshooting this would be greatly appreciated.
IIS has introduced Suspend action for idle timeout, when site is idle for specified duration, IIS will suspend process, god knows what happens exactly but looks like it just hibernates the process. And waking up may not work, so you can change this action to terminate for idle timeout.
Second option is to keep site awake by using pingdom or site24x7 services.
Could it help to try Azure Web App and set Always On?
http://azure.microsoft.com/updates/azure-web-sites-adds-always-on/
It looks like I found a solution.
The app start event in global.asax included "var assemblies = System.Web.Compilation.BuildManager.GetReferencedAssemblies();" in order to make sure that everything loads, but that line was -after- the call that was triggering all of the dependency registration. I cut/pasted that line so that it happens first and the site came up fine when I tried it this morning.

Lightswitch Deployment Issues

I am trying to deploy a lightswitch app via web deployment. This will be a web application. It seems to publish just fine, and after a long period of troubleshooting, a coworker and I were able to finally get an admin user added, but now the site just shows a white screen with "Loading," but nothing else ever happens. We are using .NET 4.0. There is no indication of an error, and we have the trace logs available, but I don't see anything that looks like an error. Does anyone know what might be happening. I am using VS 2012.
Thanks!
If you're Debugging the app locally, and you're using forms authentication, and have the "Application Administrator Already Exists" option selected in Publish settings, you're always taken to the Desktop Client in order to "Setup" administrators. Simply navigate to the HTMLCLient (or whatever you've called it) by typing "http://myapp.com/HTMLClient" into the address bar. This should allow you to use your app, or at least login.

visual studio development server automatically redirects to default port with machine ip

This is a weird issue I have been facing for a couple of days now. When I run my ASP.Net web app from visual studio 2010, it starts the dev server and opens IE. I can see the correct URL getting formed (ex: http://localhost:53990/index.aspx).
But then it redirects to "http://my-machine-ip". I can see the dev server process (webdev) in task manager. If I browse the above URL in a separate IE instance, manually, I still get the same behavior.
This problem comes in chrome as well, but works properly in Firefox.
Since it was working in FF, I ignored it, but now an increasing number of my colleagues have started facing the exact same issue. Tried searching for a solution on Google and stackoverflow, but couldn't find any.
Has anyone else faced a similar issue? Would be great if I can get any help/pointers with this issue. Please let me know if you need more details.
PS: I am coding in c#, not sure if it matters but thought I should specify it.
I have faced this issue and resolved by following steps:->
Open IE
Go to Internet Option ->Connections
Click on Lan Settings
Uncheck Automatic detect settings check box.
Clear all browser cache/history
Try and browse the site now. You should be able to view your site
Since Chrome uses IE settings, this solution should work for Chrome too.

Local Testing and Debugging Facebook iframe app (Windows Azure)

I wonder what the best way to test and debug facebook iframe applications locally (using the facebook c# toolkit and the azure toolkit)?
When i try to debug it's always starting the Compute Emulator on a different port.
Basically i want to have a special facebook iframe app pointing to a specific port on localhost (e.g. http://localhost:81) and after pushing the debug button that my app url (e.g. http://apps.facebook.com/myspecificappdev) is being started in my browser (with debug functionality).
I found this thread but unfortunatly this didn't help me a lot: http://azuretoolkit.codeplex.com/discussions/207487
What's the best way to debug such applications? Is their maybe a sample project which already has that part set up correctly?
Ok, here is what we do (at Thuzi). We set up an dedicated IIS web site for our code. We create a bogus domain like fbapp.mycompanysdomain.com and then we edit your machine's (or other machine's) Hosts file to point to the proper IP address. When we set up the site in IIS we use a host header which means that we don't need to worry about port numbers. When we debug we simply attach to the process.
So you point your web browser to the FB URL and it should always land on your web server (whether you are debugging locally or not). I know this sounds like a little more work, but it ends up being so much easier in the long run and better reflects what will ultimately happen. I realize if you are using any kind of storage then you will need to start that up, but it's still a lot easier this way..
If your app is simply a website, then you don't need to run the compute emulator to run it. I would setup the site so that it runs on IIS on a specific port, then debug the website project, not the cloud project.
There is a bit more to it than just that however. If you're using development storage then you'll need to start that yourself as it won't automatically be started when you debug the website. If you have a RoleEntryPoint class then you need to be aware that none of that code will be called. Also if you make use of anything in RoleEnvironment (like settings) you'll need to put a wrapper around those items so that they'll still work when not running under the emulation environment (RoleEnvironment.IsAvailable is very useful for detecting this). A setup like this is very useful during development because when you make small changes to CSS of JavaScript you don't need to restart the compute emulator to see your changes.
You're on the right track. You need to create a new facebook app and point the iframe / canvas / tab url to localhost with the specific port cassini chose for the project.
What I did to ensure the the windows azure app stays on the same port:
I placed this as a pre-build event:
"C:\Program Files\Windows Azure SDK\v1.4\bin\csrun.exe" /devfabric:shutdown
This makes it better but it's still switching port sometimes

Categories

Resources