GeoDesic Buffers sample code does not work in my local IIS Server - arcgis

I am new to use ArcGis Api for javascript, I am using JS Api 3.20.
I have been trying for 3 days but it does not work.
I have taken code from the following link
Geometry Engine - Geodesic buffers | ArcGIS API for JavaScript 3.20
I paste this in My Html file create in VS website for .Net , and setup a local server for my page using IIS server
I also downloaded proxy from GitHub resource-proxy/DotNet at master · Esri/resource-proxy · GitHub
setup it in same application in IIS
Downloaded excel file added in my application from https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/4.5_week.csv
but still I am getting the following error in console using developer mode when set Proxy URL to this
config.defaults.io.proxyUrl = "/192.168.8.188/Proxy/proxy.ashx";
GET http://192.168.8.188:1555/192.168.8.188/Proxy/proxy.ashx?http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/4.5_week.csv 404 (Not Found)
and when I set proxy url to this
config.defaults.io.proxyUrl = "/Proxy/";
then the following error occurs in console
GET http://192.168.8.188:1555/Proxy/?http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/4.5_week.csv 403 (Forbidden)
Could you please help me out. I would be thankful in advance.

I Resolved My Issue thanks.
Basically I didn't enable IIS 4.5 web features so I read readme file of proxy which resolved my issue.
Here is what I read from ReadMe file located in DotNet folder of Proxy
Troubleshooting: If you get an error message 404.3, it's possible that ASP.NET have not been set up. On Windows 8, go to "Turn Windows features on or off" -> "Internet Information Services" -> "World Wide Web Services" -> "Application Development Features" -> "ASP.NET 4.5".

First off, try setting the proxyUrl value to this:
config.defaults.io.proxyUrl = "/proxy/proxy.ashx";
That may resolve the issue.
EDIT (based on clarification that IIS is in fact running on port 1555):
You might want to confirm that you can access the proxy at all, by entering the proxy url directly in your browser (with no arguments), eg:
http://192.168.8.188:1555/Proxy/proxy.ashx
If this resolves correctly, you should get an error response in JSON format like this:
{error: {code: 400,message:"This proxy does not support empty
parameters."}}
That at least would confirm that the proxy is accessible and functioning properly on your system.

Related

Publish .NET Code application to Arvixe Host

I have a ASP.NET Core with Blazor website and I want to deploy it to Arvixe host. The website is very simple and contains only UI elements no database required. I published the website to a local file system and uploaded it using FTP to the Plesk.
When I am visiting the website, I receive this error:
500 - Internal server error. There is a problem with the resource you
are looking for, and it cannot be displayed.
I have tried to run it on the IIS and I received more details:
Configuration The configuration file cannot be read due to
insufficient permissions.
I tried to add IIS_IUSRS to the group and users for web.config but I am not able to find it because I am using a windows 10 connected to active directory.
Besides, I still don't know how to solve this problem at Arvixe. Does anyone know tips might help?
500 internal error is generic issue. Please kindly check the error message on the server and paste it here. Make sure that your provider has installed .net core bundled on their server and here are tutorial about publsih .net core using plesk https://windowswebhostingreview.com/how-to-publish-using-web-deploy-with-plesk-control-panel/. It should be working fine.
You need to give Full Trust permission (Read-Write-Execute) to your application folder and also to Application Pool and also check if the Runtime version supported by Arvixe matches with your Asp.net Core version.
Also enable the logs in web.config file by setting stdoutLogEnabled="true" to get detailed error so that you can investigate more about the error.

Cannot run published website that using database

I started to code my new website using ASP.net core
Everything runs properly with development environment: Open VSCode and F5 to run.
But after i publish all of them to IIS, it runs with 404 error
This localhost page can’t be found No webpage was found for the web
address: https://localhost:1111/ HTTP ERROR 404
The error page is displayed when the page connects database to runs backend actions.
Any actions in published web that don't use database such as href to another link, run javascript validation, ... would run with no 404 error
Do I miss anything or make something wrong?
here're the steps that i did to publish my site
open terminal and run dotnet publish --configuration Release
copy publish folder in bin\Release\netcoreapp2.2\publish to the publish folder in IIS setting
open IIS and add application pool with .net CLR version is No managed code
add website with application pool above, bind type is https, hostname is localhost, and tick all 3 checkboxes (Require server name indication, Disable HTTP/2, disable OCSP Stapling), SSL certificate is IIS Express Development Certificate
I forgot the page that guided me those steps
I myself have found the cause. The reason that the web app return a 404 page when I post something to backend to process database is I used windows authentication in my database connection string. So it couldn't access the database when I publish to IIS. When i change connection using sql server authentication, it works properly

setting "server name" when using kestrel with dotnet core

I am writing an app using asp.net mvc that right now runs against microsoft's kestrel server. It works fine, and I pass values to it at startup using a hosting.json file defined as follows;
{
"server": "Microsoft.AspNet.Server.Kestrel",
"server.urls": "http://localhost:5000;https://localhost:5001"
}
Is there any way to give the "server" a name, so that it isn't always reporting as localhost or undefined all the time?
Please replace localhost with *. This will give the below benefits:
If you give localhost, you can access the application only through http://localhost:5000 and not using IP [http://192.168.1.2:5000, an example]. By using *, you can access through the IP.
You can connect to the server from other PCs or Mobile Devices.
A few days back, I had the same requirements as yours and got the solution from: docs.asp.net. [The Comments section is hidden by default. Please click Show Comments and search for localhost.]
Tip 1: To view the application from a mobile device, please check: Viewing localhost website from mobile device.
Tip 2: My question and answer has been posted here: Compiling an ASP.NET 5 Web Application and generating DLL files.

MapServer as a CGI in IIS alongside QGIS (WinServer 2008)

Has anyone got some experience with MapServer as a CGI running on IIS7 (WinServer2008)?
I get the CGI running fine with a MSSQL2008 plugin. This however doesn't allow me to use a BBOX filter. I install QGIS in order to get the OGR tools and can no long access my PROJ_LIB thereafter.
I get thereafter the following error response from any WFS requests to the MapServer CGI module:
This page contains the following errors:
error on line 1 at column 1: Document is empty
Below is a rendering of the page up to the first error.
Removing my PROJ_LIB CONFIG reference causes following error excpetion:
msProcessProjection(): Projection library error. Permission denied
I got around this problem for now by using the default Apache setup for MS4W. However this requires me to a use a proxy in order to use the WFS in an IIS hosted OpenLayers site.
I hope someone else has a few ideas in this regard.
Cheers,
Dennis

HTTP Error 404.3 - Not found - The page you are requesting cannot be served because of the extension configuration

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.
what could be the reason of this error for the WCF service hosted on IIS 7.
Answered here
Please make sure you've activated WCF components from here.
Or alternate and easy way is, go to control panel -> Turn Windows feature on or off -> and make sure you've all the options ticked as mentioned in below screenshot.
Run from cmd:
%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir
All you need to do is enable HTTP Activation and any other features that are required for HTTP activation.
For Windows Server 2012,Go to server manager, on the dashboard --> click on Add roles and features. In the Wizard window that opens choose the appropriate server and go on clicking next until you are on the features selection page.
Depending on the version of .NET framework in use on your server you have to check HTTP Activation under WCF Services and proceed to install it. This should resolve your issue.
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
Thanks for the blog from Rahul.
http://blogs.msdn.com/b/rjohri/archive/2009/06/29/the-page-you-are-requesting-cannot-be-served-because-of-the-extension-configuration.aspx