.NET Compact Framework 3.5 consuming .NET 4.0 Web Service - iis

I'm using Visual Studio 2008 with target platform Windows CE using .NET Compact Framework 3.5 and trying to consume an ASP.NET WebService which is running on .NET 4.0
The ASMX location is at http://localdomainentrygoeshere.net/Default.asmx
The web method is called "PrintBarTenderFile"
During the generation of the web reference I can see this method so I know it's picking it up no problem.
I've invoked the web method as follows:
PrintSvc.Default d = new Optiplan.ShopFloor.EmbeddedClient.PrintSvc.Default();
d.PrintBarTenderFile(printerName,
printFileName,
printerQuantity,
"TEST",
"",
"",
"",
"",
"",
"",
"",
"",
"TEAM",
""
);
Which an web exception is occurs and you look at response which is an 404.
There isn't anything I can see in the IIS logs and I can manually execute this via web browser so the parameters are correct.

After few hours of banging my head against an wall, I've found out that when the Windows CE device is connected to the USB Cradle it reverts all traffic to localhost and you need to set network in Windows Mobile Device Center.

Related

Publishing and hosting Web API developed in .net core through IIS

I have WEB API developed in .net core (VS 2017). I need to deploy this api in IIS. This is the procedure I have followed.
Open VS 2017, open the project -> right click on API , click on Publish.
Selected File System -> Give a path where binaries where to be placed-> Click on Publish button.
After it is finished, there are some files in the physical path. I have copied the files on to the server where it is supposed to be hosted.
In the server, this is what I have done:
Installed .Net core run time.
Opened IIS , right click on default website -> Add Application -> Give name of application (say ABC) -> give physical path (where binaries are copied)-> Click OK.
There is a simple Get method in the API for now, where it just returns a string.
Say if the IP address of the server is 10.1.1.1 , this is the URL I'm using.
http://10.1.1.1/ABC/api/GetData
I'm trying this through Postman. I'm getting 500 Internal server error.
When I follow the same process for Web API developed in .Net framework, it is working perfectly fine.
Is there any step which I'm missing for .net core?
You need to ensure the following:
.NET core hosting bundle is installed on the server
Your application pool .NET CLR version is set to “No Managed Code”
For details check https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-2.2

Unable to run .net core webapi webservice in IIS version 10 with a hostname

I developed a .net core webapi webservice that communicates with sql server database
and this runs fine locally with IIS Express within visual studio 2017. I published from visual studio 2017
to a file system and moved all files to iis.
I created a hostname in my windows 10 host file like this
127.0.0.1 testing.com
However I call my webapi like this http://testing.com:8080/api/usertbs and nothing is displayed on the
screen meaning it is not working in iis
In IIS I set my .net clr version to "No managed code" - Application pool
I installed the .Net core windows server hosting bundle.
However, I found a file named launchSettings.json in my solution and found an applicationUrl entry like this
"WebApplication1": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "api/values",
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
when I run this, I get a json file back which is good and means that my webapi is working
http://localhost:5001/api/usertbs
It seems like this is running somewhere else. How can I make this run in IIS so that i can use the url
below.
http://testing.com:8080/api/usertbs

How can I deploy an Asp.Net MVC Core application, using .Net Framework (not core) in my local IIS?

Using Visual Studio 2017 the most obvious way to me is to publish to IIS using file system. When I host the folder that comes outof this publishing in IIS I use an App Pool with .Net 4.5.1 (I also use .Net 4.5.1 for my app). When I access the web page with the browser, static content works, but dynamic content returns HTTP 501 without further information.
In the events viewer I see no entries.
How can I diagnose this? Should I try another way to get the app running in the local IIS and later on an inhouse server using IIS?
As described here http://learn.microsoft.com/en-us/aspnet/core/publishing/iis "Set the .NET CLR version to No Managed Code." your IIS application pool shoudln't be running .Net and should be set to No Managed Code.

HTTP Error 404.3-Not Found in IIS 7.5

I'm using IIS 7.5 on Windows Server 2008 R2 x64 Enterprise Edition. In the project we have developed with ASP.NET 4.0 we used WCF Service. But it doesn't run over domain when the software is running from local computer. Otherwise, I am getting the following error:
HTTP Error 404.3-Not Found
The page you are requesting cannot be served because of the extension
configuration. If the page is script, add a handler. If the file should
be downloaded, add a MIME map.
You should install IIS sub components from
Control Panel -> Programs and Features -> Turn Windows features on or off
Internet Information Services has subsection World Wide Web Services / Application Development Features
There you must check ASP.NET (.NET Extensibility, ISAPI Extensions, ISAPI Filters will be selected automatically). Double check that specific versions are checked. Under Windows Server 2012 R2, these options are split into 4 & 4.5.
Run from cmd:
%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir
Finally check in IIS manager, that your application uses application pool with .NET framework version v4.0.
Also, look at this answer.
In my case, along with Mekanik's suggestions, I was receiving this error in Windows Server 2012 and I had to tick "HTTP Activation" in "Add Role Services".
In windows server 2012, even after installing asp.net you might run into this issue.
Check for "Http activation" feature. This feature is present under Web services as well.
Make sure you add the above and everything should be awesome for you !!!
I was having trouble accessing wcf service hosted locally in IIS. Running aspnet_regiis.exe -i wasn't working.
However, I fortunately came across the following:
Rahul's blog
which informs that servicemodelreg also needs to be run:
Run Visual Studio 2008 Command Prompt as “Administrator”.
Navigate to C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation.
Run this command servicemodelreg –i.

Consuming web services from Windows Embedded Compact 7 (windows CE 7)

What are the options for consuming web services (hosted for example in Windows Azure) from Windows Embedded Compact 7?
WCF from Compact Framework 3.5 is one possibility, I guess. Are there any others?
Can I access web services directly from my Silverlight (C++) application?
Thank you.
I have not tried this myself, but you could try using SPROXY tool shipped with visual studio.
From MSDN: SPROXY.EXE is a command line tool that generates native C++ client code for accessing an XML Web service based on a WSDL description.

Resources