Can anyone provide a repeatable process for hosting a precompiled website or a web application in IIS6 that can be built using aspnet_compiler? I cannot get code to build reliably (works sometimes) with aspnet_compiler without hitting the "cannot load type: global" error. Changing to a website does not help as I can't even get the precompiled site to come up in IIS6. Whether it's a site or an app makes no difference to me so long as it works.
If anyone has some good info or can point me in the right direction, much appreciated!
It should work if you develop it as a web application, which will compile the service code into a single DLL. Dropping that DLL into the bin directory and copying the SVC file should work fine.
Related
What happens?
I publish a website to UnoEuro on a windows server.
When I do I keep getting the error message:
"HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid."
What have I set up/tried?
What I've done is that I've created a .NET Core 2.1 Web API which hosts fine locally on my computer using IIS. I have then published the web api to the hosting site UnoEuro where I can see that the files are uploaded as they should be.
I asked the hosting sites support, they told me to just ensure that it was deployed as self-contained but that otherwise they could not help further. It looks like there is a hosting issue of some sort related to that it cannot seem to find the webconfig file. At least that's what the error message says.
Is there any form of setup I should make? A configuration I should change? Should I set up some SSL settings in the web API which I might have missed? When I started the project I told it to enforce HTTPS, but surely I should get another error message if that was the fault?
I've tried publishing with the target runtime set to both x64 and x86.
I've never published an API like this to anything but Azure before, so I might be doing a thing or two wrong but I cannot see what it should be? I have Googled around but not found anything that seems relevant which has worked.
Most of the solutions seem related to changing the server environment which I don't have so much control over, I mostly just have control over the application/web api, at least that's what it looks like to me.
Hope you have any suggestions, I'm all eyes n ears.
Side question: Should I use IIS Manager for this? I'm currently publishing through Visual Studio 2017.
Images for further understanding
Publishing settings
Deployed/published files
Error message I get
EDIT:
I tried moving the files to /public_html on the same domain as ISS Manager seemed to indicate it expected the config file to be there.
That then resulted in a different error message as you see below.
Link from error message: https://go.microsoft.com/fwlink/?LinkID=808681
It's hard to say exactly, but I think the issue is that the ASP.NET Core hosting bundle is not installed on the server. There's two pieces to hosting in IIS. First, you need the .NET Core runtime, and then you need the ASP.NET Core hosting module for IIS. Deploying as self-contained buys you the runtime, but not the hosting module in IIS. There's non-standard sections in the Web.config created by publishing an ASP.NET Core app. The hosting module shims in support in IIS for these config sections (among other things). Therefore, the config error seems to imply that this is not happening.
If you don't control the server, there's not much you can do about it. Honestly, at this point, I wouldn't host anywhere where you do not at least have some measure of control over the environment. You can get a full VPS from numerous hosting services for $5 or less a month. Either continue hosting in Azure, or look into other respected cloud providers like DigitalOcean, AWS, etc.
I have a very strange issue that i cannot figure out.
First i have a WCF service 4.0 done in VS2010.
the service have couple methods that return string array, datatable and such.
some of them use function from C++ dll throught [dllimport]
i made a test console to test everything. when i run the WCF from visual studio and use the generated path it works wonderfully.
now here is where it become strange. if i open my local IIS create a new application and point to my VS source code the WCF i can see it perfectly.
now using the http path from IIS local instead i refresh the methods all seems correct. But when i run my test app i can call any unction without any problem EXCEPT anyone using DLLIMPORT functions. they ALL crash and cannot trace even by tracing CES exceptions.
Doing line by line logging show that the exception is really on the call of those functions
the DLL in question is the same and the path is hardcoded for my computer since still in test phase and the folder is c:\DLL\mylib.DLL so nothing to do with shadow copy IIS/visual studio do when you actually run. also DLL reference by name withotu path even if it's in sys32 doesnt work.
Any clue ?
also. 32bit, changing app pool level right access on folder, full admin on machine already too. all tried but unsuccessful.
Edit: adding to all that since i haven't made this clear, it's not my first WCF real setup. i've already made alot of services before and deployed them myself (probably somewhere around 50-60 services). I am asking because i have never seen this issue before and i tried all tricks i knew and could find on the internet and resource people i know.
We have decided to incorporate the whole service in the WPF project locally since it work as long as IIS is not hosting. but this is really not a good thing as this data and work should NOT be done on client side but instead on server side. Right now it's fine since the software that need to use this is not released to public yet so it isn't critical.
Next option will be net TCP/IP windows service hosted on the web server if i don't find anything else.
We decided to go trough the trouble of having to hard code the logic in the main software and get away from web services for this issue. we will have to deal with updating, installing unregister and re register unmanaged DLL by hand somehow but at least it works.
we have added over 5 web services since that happen and no problem with them but again none of them use DLL imports.
I'm hosing a webservice in IISExpress and can browse to the endpoint using my browser so I know its alive. I'm writing a test application in WinForms and want to call a method on the service.
When I try and step into the call, I get this error.
IISExpress: Unable to automatically step into the server. the remote procedure cannot be debugged.
The webservice is set to be in debug mode, I'm wondering is there some setting which is preventing IISExpress from allowing debugging?
Update:
I'm wondering if this is because the Test app doesn't have any .pdb files loaded into memory as these are stored elsewhere within the webservice folder, NOT the test app bin folder.
I've tried to specify the folder of the bin folder where the app_code.pdb is located for the webservices, but still not luck.
So how is this done? I'm stumped.
Update 2:
Still haven't been able to get this to work after a week of looking into it.
So here are my basic requirements: I need a 1) WinForms app to 2) be able to make calls to different webservices and 3) be able to step into each service call. The services are hosted as sub-applications of a root website using IISExpress. The WinForm test app is making the web service calls, but IISExpress is started via a Nant task. The webservices are old web site type projects, so they have app_code.dll files. I've tried setting symbol paths up to point to the built pdb file, but I then get an error along the lines of:
"A matching symbol file was not found in this folder".
I never thought debugging webservices would be this difficult?!?
1) Reference the DLL of your webservice in your test project.
2) IISExpress is a completely different application then your winforms application, just having the DLLs referenced still won't automatically allow you to step into your web service code. You need to attach to the IISExpress.exe process. When you start your winforms project, Hit Debug...Attach to Process and choose IISExpress.exe. Now you should be able to actually step into your web service code.
I realize this is a late response but it's something I've run into (especially after having stepped away from a WCF project for long periods of time).
Make sure you have your breakpoint set in your "server-side" service class code...and not in your "client-side" calling code. This is so the server side service has the necessary debug info (your breakpoint) compiled into the .pdb file on the server.
I have an ASP.net web service sitting on a server, and I have verified that it works properly via a small test client app in VS.
I went to add it in MonoDevelop to my MT application, (Trying both the ASP.net 2.0 and WCF declarations). Inside the "Add Web Reference" wizard, it finds the web service fine. But when I go to reference it, the app doesn't know it exists.
I went to look at it, and it seems when adding it, the namespace it's assigning to it is the title of my solution (which has spaces in it), but the namespace for each of my .cs files within my app contains no spaces.
Web Service Namespace (that it wont let me change): Ultimate GameDay 2011
MT Application Namespace: UltimateGameday2011.
So I manually went into the reference.cs file and took out the spaces. The app classes then saw my web reference object, but it still won't allow me to access any of its members.
Any help would be greatly appreciated.
Check out the following link http://merbla.blogspot.com/2011/03/monotouch-with-json-using-aspnet-mvc.html
Its not a fix to your problem rather a method of creating web services that MonoTouch more easily works with. In my experience ASMX and WCF services have been problematic when consuming in a Monotouch app.
If all else fails, try using the Silverlight service utility located in your programs folder
e.g. C:\Program Files (x86)\Microsoft SDKs\Silverlight\v4.0\Tools\SlSvcUtil.exe
I have an ASP.NET web application (.NET 4.0) that has a few pages, one page with a silverlight application in it.
When I debug locally, the silverlight app works fine. When I deploy to my web server (Windows Server 2008 R2, IIS 7.5), the silverlight app will not display.
I get an exception in Application_Error saying the following files are missing:
clientaccesspolicy.xml
crossdomain.xml
I have found a few things on the net that aren't very helpful - they say they need to be in C:\inetpub\wwwroot. I don't have a 'Default' website in IIS7.5 and I don't have these folders?
Where can I find them and where should I put them?
Please help, as this is very urgent. Many thanks.
EDIT: So I have tried doing what the link in my comment suggests. Some more info: I have a Silverlight-enabled WCF service that the Silverlight app uses in order to work.
Do I need to do anything special when deploying my app with an .svc file? I remember having to enable access to .svc files back in IIS5, but I don't know if that's necessary in IIS 7.5?
Hope this extra info helps. If you need any code snippets etc, let me know.
Thanks.
Well, worked it out - a slightly embarrassing and annoying problem..............
The service reference in the Silverlight application had a client address of 'http://localhost......', which was added by Visual Studio when I added the service reference.
I found a blog post by Tim Heuer describing the issue. I had to set the client address to a relative one, using '../Service.svc' in the ServiceReferences.ClientConfig.
Very annoying, sort that out please Microsoft!!!