I have an Azure Cloud Service, with two web roles - one MVC, one Web Api. When I debug, it's running on Azure compute / storage emulator. I'm using IIS Express 7.5.
Both were working fine until I updated to Visual Studio 2013 Update 3 and Azure SDK 2.4. Now the MVC web role is fine, but the Web Api role just says 'The page cannot be displayed because an internal server error has occurred.'
I have tried adding:
<customErrors mode="Off" />
and
<httpErrors errorMode="Detailed" />
to the web.config, but to no avail. Where else can I try?
Related
I have an asp.net core 2.1 website running on a windows server as an azure web app. I was asked to enable "keep-alive" so that when a client asks for "Connection:Keep-Alive" the connection is NOT closed. I cant find any documentation on how to do this (nor if this is even possible).
The reason for getting a persistent connection (if this is the correct term) is to reduce the overhead from the SSL negotiation.
I did find this: Azure Website Connection Keep-Alive stack-overflow question. The provided answer doesn't help. There is no web.config file in asp.net core web apps. i didn't find anything else regarding Keep-Alive in asp.net core.
Actually, there will still be a web.config file for IIS in web app. After you publish your .NET Core web app, you can use Azure Kudu tools from portal to checks files, and you will find the web.config generated by system.
So, you can manually add a web.config file in your project:
And then choose web configuration file
Then, you can add your configurations:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<httpProtocol allowKeepAlive="true" />
</system.webServer>
</configuration>
Finally, deploy your project, and configurations will be updated in kudu:
I am supposed to update SharePoint list with information from BizTalk 2016. I am aiming at using Windows SharePoint Services adapter and CSOM. I have enabled Windows Identity Foundation (after installing BizTalk) on the BizTalk server.
I get the following error when send port runs:
The Windows SharePoint Services site was not found. The URL
"http://xxx.sharepoint.com/sites/yyy/" points to a
SharePoint object for which there is no Windows SharePoint Services
site.
I have enabled tracing of WIF (but I get no logs):
<system.diagnostics>
<sources>
<source name="System.IdentityModel" switchValue="Verbose">
<listeners>
<add name="xml" type="System.Diagnostics.XmlWriterTraceListener" initializeData="C:\logs\WIF.xml" />
</listeners>
</source>
</sources>
<trace autoflush="true" />
</system.diagnostics>
I have tried both supplying credentials in send port configuration, and by running specific host with specific domain account. Same error.
Windows Firewall is disable on the BizTalk machine.
My scenario was that customer recently asked for the update to sharepoint online list. So, I needed to activate WIF AFTER BizTalk installation. In my trials to solve this I also installed latest CU6 and did a repair on the installation, too. But same problem.
I got a powershell script to use to test connectivity and verify SharePoint online list's accessability, to exclude the adapter itself and limit the scope of the problem. Running the script, there was a problem finding classes in the Microsoft.SharePoint.Client.dll assembly. Apparently, something was missing on the machine!
I installed SharePoint Client SDK on the machine, and - eureka - i got to the next error message!
Seems like you do need to install additional assemblies to Windows SharePoint Services Adapter, even though the documentation says otherwise. Possibly, this is due to activating WIF AFTER BizTalk installation.
On to the next (misleading) error message!
I am trying to publish my ASP.NET 5 MVC6 application to godaddy server from Visual Studio 2015. I have imported publish profile from my server and I am able to validate the connection. However, when I publish my app I have the following error:
ERROR_USER_UNAUTHORIZED
Web deployment task failed. (Connected to the remote computer
("XXXXXXX") using the Web Management Service, but could not authorize.
Make sure that you are using the correct user name and password, that
the site you are connecting to exists, and that the credentials
represent a user who has permissions to access the site.
The credentials are valid, I can publish VS2013 sample project from VS2015, but I can not publish VS2015 sample project as well as my app from VS2015 with the same credentials.
The user is an admin on the server.
The first thing you need to check is if GoDaddy supports 4.5.1 on their server. Once this is confirmed? We can start working!
Helios (the shim between IIS and ASP.NET 5) requires at least 4.5.1 to run so this is why it's essential.
Only thing missing is running a dnu publish and making sure that you have a web.config with this section in it:
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
</system.webServer>
If it doesn't work, I would get in touch with GoDaddy for some support. If they do not support the latest version of the framework, you might have to revert to MVC 5 or switch to azure-web-sites if you really want to enable asp.net-mvc-6.
I am trying to make AspNetComet.zip work on IIS7
(a simple comet chat implementation) Here is a portion of my web.config.
<system.web>
<httpHandlers>
<add verb="POST" path="DefaultChannel.ashx" type="Server.Channels.DefaultChannelHandler, Server"/>
</httpHandlers>
</system.web>
<system.webServer>
<handlers>
<add name="DefaultChannelHandler" verb="POST" path="DefaultChannel.ashx" type="Server.Channels.DefaultChannelHandler, Server"/>
</handlers>
</system.webServer>
When I publish the website on my localhost IIS7 I receive an error:
POST http://localhost/DefaultChannel.ashx 500 Internal Server Error
Could not load type 'Server.Channels.DefaultChannelHandler
The target framework of this project is .Net 2.0 I tried the Classic and Integrated Mode application pool for .Net 2.0 with no luck. I also tried converting the project to 4.0 and tried the Classic and Integrated Mode application pool for .Net 4.0 with no luck. I also tried adding the managed handler through IIS Manager's Handler Mappings.
If you have time please download the source (184kb) to reproduce the problem on your own machine. The zip contains a VS2010 solution (.Net 2.0). You could also try to convert this to .Net 4.0
I am using Windows 7 anyway if that matters. If you need more details, please drop your comments below. This is working fine by the way on my webdev server.
NOTE: I created a version of this question here as I believe it suits SO better (based on the tags and user base) than what I posted on SF https://serverfault.com/questions/245241/ashx-cannot-find-type-error-on-iis7-no-problems-on-webdev-server
This is an example chat code of AspNetComet from methodworx. When deploying it to your local development environment. I would assume that you don't have your own domain thus you will create a web application underneath the Default Website. That makes http://localhost/DefaultChannel.ashx and invalid path.
You then have to append the directory name of web application similar to this. http://localhost/WebApplicationName/DefaultChannel.ashx . On the other hand AspNetComet will encounter another error something like comet client does not exist.
I have resolved this by converting the service reference .svc to a .asmx web service.
I'm very new in web programming stuff, so my question is about basics. I'm developing a SilverLight application and need to access the database from it. I'm using LINQ to SQL to get data from database and a WFC web service to deliver it to my app.
Everything is working fine when I'm running my app within Visual Studio. When trying to publish the web service to IIS - the web service call fails.
To make my question simple, I will focus on a brand new web service. Here the steps I'm doing:
Start Visual Studio 2008 -> File -> New -> Project -> Web -> WCF Service Application
Project Name: MyWcfService
Resulting Visual Studio generates a sample project with implemented Web Service "Service1"
Rebuild, start from Visual Studio (host on ASP.NET Development server)
--> Everything works fine, I see my service under http://localhost:52489/Service1.svc link
Now I want to host this service on my IIS (I've IIS7 on Vista x86 PC)
Visual Studio -> right click Project -> Publish -> target location -> Create new web app named "MyWcfService" -> Publish
Just to be sure check my C:\inetpub\wwwroot\ folder - now it contains the "MyWcfService" subdirectory with all required files.
Open IE on my PC http://localhost/MyWcfService/Service1.svc
The result is:
HTTP Error 404.3 - Not Found
The page you are requesting cannot be served because of the extension configuration. If > the page is a script, add a handler. If the file should be downloaded, add a MIME map.
I were trying to remove "identity" section from web.config - same problem. Switching off the firewall does not help either.
Can anyone help me? What I'm doing wrong? Maybe I am missing something?
Per Nicholas Allen, Program Manager WCF/WWF,Silverlight # Microsoft:
What registration in IIS is responsible for processing SVC files?
There are two parts to the registration. One part is related to ASP.NET and the other part is related to WCF. The ASP.NET part is that the ASP.NET ISAPI has to be a service extension for IIS. The WCF part is that the HTTP handler has to be a managed handler.
The commands for setting up the two parts are "aspnet_regiis –i –enable" from the 2.0 framework tools and "ServiceModelReg.exe -r" from the 3.0 framework tools.
This results in a managed handler "System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and an ISAPI module "%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" for *.svc files in IIS. In the IIS handler mappings, the managed handler has to be above the ISAPI module for this to work.
Together, the two parts start an HTTP pipeline and pass the resulting requests into WCF.
IIS will only direct requests to ASP .NET for certain files like aspx by default. I'm guessing that you don't have the svc extension mapped to asp .net. Try looking at this http://msdn.microsoft.com/en-us/library/bb515343.aspx.
Silverlight can only call web sevices in the exact same domain as the application (where the xap file lives)
To call a different domain you need to have a clientaccesspolicy.xml file where the web service lives. It's possible this is your problem.
<?xml version="1.0" encoding="utf-8" ?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from>
<domain uri="*" />
</allow-from>
<grant-to>
<resource path="/" include-subpaths="true" />
</grant-to>
</policy>
</cross-domain-access>
</access-policy>
You might not have ASP.Net setup properly in IIS. Take a look at this article:
http://msdn.microsoft.com/en-us/library/aa964620.aspx