IIS configuration - web.config. Problem with redirecting to error page - iis

I have problem with IIS configuration.
I have SOAP Service available via IIS.
When I create request with good values I will receive 200 and content type as text/xml and body as xml string.
When I create request with wrong values - in my code I will throw FaultException, but from Visual Studio I receive 500 and body as xml string with my values, but on my server environment somehow I am redirecting to error page.
I tried to setup this in web.config file, but after removing all values connected with errorPages - still the same problem.
Any idea how to fix this?

Related

Azure copy data failed to read data from http server

I am new to ADF. I created an http linked service and it tested successfully (https://rebrickable.com/downloads/). On the http dataset properties page the same url address is in the Base URL. I then put just the file name that exists on that page (themes.csv.gz) in the Relative URL. When I click next to the File format settings page the Preview pane says:
Failed to read data from http server. Check the error from http
server:The remote server returned an error: (404) Not Found. The
remote server returned an error: (404) Not Found. . Activity ID:
0ca9f9c7-438d-461a-81c1-f81bacace4ca
What am I doing wrong please?
I also tried to create a new linked service and point it to my desktop files. I selected'File', left it at AutoresolveIntegrationruntime, put the path in Host. But don't know what do to with User/password. Please help
I hit the above mentioned end point in by browser : https://rebrickable.com/downloads/themes.csv.gz
Looks like the file is not existent at the mentioned location.
I did a quick scan of the page https://rebrickable.com/downloads
Encountered the below file :
Saw the file hyperlinked to this url (This is different from what you're attempting to in the ADF)
https://cdn.rebrickable.com/media/downloads/themes.csv.gz
I was able to download the file by using the above.
Would suggest you to try the above endpoint.
Update your url to https://cdn.rebrickable.com/media/downloads/ in https connection source

Microsoft sample WordCount does not work on Local Cluster

I am trying to learn the development process for Service Fabric
by using one of the popular samples from Microsoft, called WordCount.
I do not have Azure account yet, so I installed the Local Cluster
on my Windows 10. I went through the instructions on Microsoft
website and most of it works. I can see the Cluster Manager with:
http://localhost:19080/Explorer
where I can see the application:
fabric:/WordCount WordCount 1.0.0 OK Ready
From inside the Powershell I can connect to the Local Cluster
and run the cmdlets with output as expected
Get-ServiceFabricApplication
Get-ServiceFabricService -ApplicationName 'fabric:/WordCount'
Get-ServiceFabricPartition 'fabric:/WordCount/WordCountService'
The problem is when I run
http://localhost:8081/wordcount/index.html
the browser does not display anything. It is supposed to display
the counts of words generated by client-side JavaScript
and processed by ASP.NET Web API. My browser has JavaScript enabled.
I do not know yet enough about the code in the sample but I have its solution with 4 projects loaded in VS2017. I just want to make it work ASAP.
Below I attach a part of console output in my browser (FireFox). Apparently, the JS script is getting
[HTTP/1.1 404 Not Found 0ms]
in response to all requests.
POST
XHR
http://localhost:8081//wordcount/index.html/api/AddWord/WYVyl [HTTP/1.1 404 Not Found 0ms]
XML Parsing Error: no root element found
Location: http://localhost:8081//wordcount/index.html/api/AddWord/WYVyl
Line Number 1, Column 1: WYVyl:1:1
POST
XHR
http://localhost:8081//wordcount/index.html/api/AddWord/YcIMv [HTTP/1.1 404 Not Found 0ms]
XML Parsing Error: no root element found
Location: http://localhost:8081//wordcount/index.html/api/AddWord/YcIMv
Line Number 1, Column 1: YcIMv:1:1
GET
XHR
http://localhost:8081//wordcount/index.html/api/Count [HTTP/1.1 404 Not Found 0ms]
XML Parsing Error: no root element found
Location: http://localhost:8081//wordcount/index.html /api/Count?c=0.7465426272903215
Line Number 1, Column 1: Count:1:1
The problem is that you're trying to open up "http://localhost:8081/wordcount/index.html" while you should use "http://localhost:8081/wordcount/". Otherwise the javascript code builds incorrect url to access the services.

HTTP POST request from Android App denied on Domain but works using IP address‏

I'm trying to send a HTTP POST request to a PHP file on my web hosting server from my Android app.
That request contains the data from the app and is validated or saved on the server and then the PHP file sends a JSON response which is received by the Android device and the actions are taken accordingly like logging in or registering etc.
Now the problem that has arisen is that till now I didn't have a paid DOMAIN instead only a HOSTING service. That Hosting Service gave me a Server IP address to access the Index.php file I had uploaded.
So in my Android code I had written the url to be connected as http://10x.xxx.xx.xx/index.php/
and the request and response were working totally fine.
Now I have purchased a Domain name from Godaddy.com and I'm forwarding that domain name to the Server IP I had and when I open it in browser it's working perfectly fine. And so I changed the ip on which the request should be sent in my Android code to http://www.sampleurl.com/index.php/
This is my index.php file
if (isset($_POST['tag']) && $_POST['tag'] != '') {
// get tag
$tag = $_POST['tag'];
//do other authorization stuff
}
else
echo "Access Denied";
Now the problem is when I'm using the Server Ip address to connect it goes into the if block and functions correctly. But when I use the Domain name it always returns Access Denied.
The Logcat shows:
03-18 02:59:08.780: E/JSON(30892): Access Deniedn
03-18 02:59:08.780: E/JSON Parser(30892): Error parsing data org.json.JSONException: Value Access of type java.lang.String cannot be converted to JSONObject
03-18 02:59:08.780: W/System.err(30892): java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String org.json.JSONObject.getString(java.lang.String)' on a null object reference
Now I don't know how a letter 'n' is appended after 'Access denied' neither why the request is not being served correctly.
P.S. I have used forwarding instead of updating the NS at the domain. Can that possibly be causing the issue?
With the DNS being configured to forward, your post-request got lost. Check your server logs. You need to set it to be a type A record.

405 POST Method Not Allowed using asp for Crystal report file

We are moving a project from IIS6, Windows Server 2003 to Windows 7, IIS7, VS2012 now. Part of this project uses old asp files to open crystal report files. It was working fine on our old server. After I moved them to the new server. It throws me an error message: "HTTP Error 405.0 - Method Not Allowed."
We have a Report.asp file. It uses a form post method to display a crystal report file. Here is the code:
(form method="POST" action="/Reports/InfoNetOverDueDate1.rpt" target="_blank" id=frmOpenReport name=frmOpenReport>
I checked the Headers info. It only Allows GET, HEAD, OPTIONS, TRACE.
Here is what I tried. In IIS, under my Handler Mappings --> Add a Module Mapping. Request Path: .rpt; Module: ProtocolSupportModule; Verbs: GET, POST.
It doesn't throw me any error message, but it doesn't show anything either.
Anybody there can help me with this? Thanks a lot in advance.

A value in a GET request remains encoded when tested locally, but not on the server

In Ghost 0.5.1-1, I added support for forward slashes in a post's URL, allowing me to fake categories like so:
/blog/hello-world/
/portfolio/freelance/
/sandbox/my-jquery-plugin/
With this change, backlinks to my old WordPress site are still accessible.
When I run the blog locally, I'm able to successfully change the URL from both the editor and the content page under the Ghost admin. The logs show an encoded value is handled:
GET /ghost/api/v0.1/slugs/post/blog%2Fnew-post/ 200 31ms
When I test the feature on my Azure site, the logs show a decoded value, resulting in Ghost displaying an error notification:
GET /ghost/api/v0.1/slugs/post/blog/new-post/ 200 31ms
The notification reads Cannot read property '0' of undefined.
The GET request contains the encoded value:
Request URL: http://obscured/ghost/api/v0.1/slugs/post/blog%2Fnew-post/
Request Method:GET
Status Code:200 OK
Could someone explain why the value is decoded only on my Azure site? In Ghost 0.4.0, I was able to save this change without issue both locally and on the server, yet with 0.5.0 and 0.5.1-1, I cannot.

Resources