subdomain | ASP.NET | Server Error in '/' Application - asp.net

I am having problems using a subdomain and ASP.NET, I guess it must be something very simple I just do not know what.
If you would like to go right to the point just jump to no. 7 below...
TVM, RConte
My hosted domain:
Hosted Service Domains: MYDOMAIN.net
Added a subdomain: (rfpesquisa)
Sub Domains
Sub Domain Remove
rfpesquisa Remove [THIS ONE]
Added a "A" record in DNS [see below]
Hosted DNS MYDOMAIN.net
$ORIGIN MYDOMAIN.net.
$TTL 86400
.....etc
rfpesquisa 86400 IN A 174.36.13.167 [THIS ONE, COPIED FROM...]
www 86400 IN A 174.36.13.167 [...THIS ONE]
TESTS MADE:
Acessed main page (not the subdomain) as usual:
(http://)www.MYDOMAIN.net/AcessaPesquisa.aspx
works fine !
Added a "kkk" so as to make for a wrong url:
(http://)www.MYDOMAINkkk.net/AcessaPesquisa.aspx
gives:
"Could not locate remote server" [as expected]
Tried a non-existing subdomain, XXXXXX
(http://)XXXXXX.MYDOMAIN.net/AcessaPesquisa.aspx
gives:
HTTP Error 404. The requested resource is not found.
[witch means to me that the server was found but the subdomain per se was not found]
Tried what I am look for dooing: (used the subdomain rfpesquisa)
(http://)rfpesquisa.MYDOMAIN.net/AcessaPesquisa.aspx
Message I got:
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /AcessaPesquisa.aspx
given that ASP.NET Message, it means to me that
--the subdomain WAS found,
the request was given to ASP.NET dll, only
it is NOT pointing to the same place as the domain, otherwise
the results for this try and no.4, the rigth one, would be the same.
file "AcessaPesquisa.aspx" is NOT in the target directory.
Please, how do I point the subdomain to the right place ?
Thank you very much,
Ricardo Conte

I guess
(1) you are using pan-domain service (one of DNS registry, redirecting requests to all sub-domains *.mydomain.net to the same server)
AND
(2) in your IIS configuration of this server, you've bound the website and the host name "www.mydomain.net" together.

Related

Azure Error 404 - Web app not found

I have publish my asp.net core web app on azure and assigned custom domain to my web app such as www.example.com and example.com. I have changed the CNAME, A and TXT record and added my hostname without issue. However, the non-www, example.com, sometimes work and sometimes it doesn't and i get an Error 404 - Web App not found. The www.example.com is always working and i don't have any issue. I tried on multiple device and computers, different web browsers and sometime everything is fine for the non-www rule but sometime i get that 404 Error. What could possibly be the issue?
These are the records i added:
A Record:
www, # and *
Txt Record:
www, # and *
CNAME Record:
www, *
On your DNS registrar, in addition to 'www' A record, you have to create a host A record with key '#' (meaning everything else) pointing to your azure external IP address. Thus example.com must work properly.

Kaa REST log appender issue

I have configured REST appender on DataCollectionDemo on the Sandbox. I have configured host = localhost, "/" at the end and beginning of URI path, no ssl. I have a http listener running on my localmachine. I have also disabled firewall on my machine. Now I cant receive the POST method on my server. Please help.
Key errors faced and their solutions while deploying Kaa REST log appender:
Error 500: I found two errors with my configuration of RestLogAppender in the admin panel. First, I had put http:// before my host. Had to remove the same. Second, I should have mentioned Relative URI path starting and ending with a forward slash /.
Error 400: I had given slightly different names to the JSON fields in the Django models. The sequence of the fields did not matter but the name of fields did matter.

IIS server redirect issue behind Cloudfront

I've got an asp.net website (let's say http://cdn.mysite.com) hosted on IIS and sat behind an Amazon CloudFront Distribution (using a CNAME to access the cdn.* url above, let's say the distribution URL is http://mysite.cloudfront.net).
If a user hits a folder/directory url without a trailing slash, the server will issue a redirect to the origin cdn url, so if a user navigates to http://mysite.cloudfront.net/thanks, they'll end up on http://cdn.mysite.com/thanks/ instead of http://mysite.cloudfront.net/thanks/
Any suggestions of how to fix this in asp.net / iis / cloudfront?
You're right - and rather than fighting it - have you configured CloudFront to whitelist host headers?
For each behaviour > Forward Headers > Select 'Whitelist' > Select 'Host' from the list and hit Add.
This setting ensures that the host header (mysite.cloudfront.net) is included in requests back to the origin (so make sure you've added mysite.cloudfront.net to your site bindings). I'd expect the redirect issued by IIS will use the correct domain name once this configuration is in place.

IIS7 - The resource cannot be found

I'm trying to setup 2 way SSL on a webservice I manage, and I'm a bit stumped on some behavior I'm seeing.
I decided to first test basic SSL and I didn't even get past this step.
I have a file /load.aspx that just displays the computer name.
When I load this file VIA http, it works just fine. As soon as I try it as an HTTPS url, I get this error:
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /load.aspx
I'm not sure why it's working on port 80 but can't find the file when I use port 443??!
Any thoughts would be helpful. Thanks!

Nginx returning a 400 error when trying to point a new domain at an existing subdomain

I have a domain running
http://www.exampledomain.com
and I have a subdomain that is working correctly at
http://mysub.exampledomain.com
both have web pages being served by nginx and I am able to hit both of those without a problem.
I have another domain that I want to point at that subdomain so it serves the same pages without redirecting the url.
http://www.myotherdomain.com
On that domain I setup these records
host name: www
ip address/url: mysub.exampledomain.com.
record type: CNAME (alias)
host name: #
ip address/url: mysub.exampledomain.com.
record type: CNAME (alias)
Now when I try to load http://www.myotherdomain.com I get a 400 error coming from nginx. Because it's an nginx error I'm assuming the dns is making it through but I could be wrong. Do I need to do something to let nginx or ubuntu be ok with serving requests from this domain? Modify my hosts file or something?
Edit: Now that it's been a little bit I'm no longer getting the error but It's loading the content of my first url. So using the psuedo domains above... www.myotherdomain.com is now loading the content of www.exampledomain.com instead of mysub.exampledomain.com
I was able to get this working by changing my record types from CNAMEs to URL frames. If anyone has more knowledge on the subject I would still love to know why my previous setup was causing nginx errors and this one isn't.

Resources