Is there an issue with IIS or ASP Classic where Request.ServerVariables("QUERY_STRING") returns blank if no default file name is given in the URL? On my local developer machine, I can do
http://localhost/xslt/?opcs/abc
which returns "opcs/abc". However, on our ancient web server, it returns nothing. I have to explicitly give it the default file name in the URL. Like so
http://localhost/xslt/default.asp?opcs/abc
While nothing too major, it is a little bit of a annoyance. One way I can maybe think of remidying the problem is have Javascript read the URL and return everything after the ?.
Unfortunately, I do not know what version of IIS or ASP we are using.
Thank you.
That sounds like a bug, I never experienced that when I used to do a lot of ASP. Make sure you are patched up to the latest version.
If you're running IIS 4.0, this may very well be the case. So you're really stuck with this ancient piece of software (and probably hardware) ? :)
Related
I have a legacy ISAPI dll, that generally fulfills requests just fine, but occasionally I will get prompted to save the dll from my browser. This is a known issue, with some good workarounds. IIS 8.5 serving dll for download instead of executing Hitting download will give you a zero byte file.
I am actually interested in doing the opposite of the workaround. How can I force this (incorrect) behavior, ie, is it possible to trick the server to download the full ISAPI dll? If so, what settings should I change. I am running IIS 7.5.
[EDIT] For clarity, I am not trying to hack anything client side. I doubt that's possible, but if it is I would really like to know. I am trying to figure out if it is possible to get the server to give up the dll with just a plain old post/get request. This is how I got it to give me the dll the first time, luckily it was zero bytes.
Thank you
I updated my open source forum app to ASP.NET Core 1.1, and after battling deployment weirdness (it broke for reasons I don't totally understand, but believe it has something to do with the changing tooling), now I find that routing is broken. When I say it's broken, I mean it continues display links with tag and HtmlHelpers, but they don't match the "clean" routing that they used to. They work correctly locally, but not in an Azure app service.
For example, the correct URL should be:
https://popforumsdev.azurewebsites.net/Forums/first-test-forum
But it's resolving as:
https://popforumsdev.azurewebsites.net/Forums/Forum?urlName=first-test-forum
I get the tooling changing, but this has me totally stumped. Same code, working differently locally and in Azure, and it didn't break until I updated to v1.1. (It doesn't instill a lot of confidence for what I assume will be relatively frequent framework updates, either.)
I don't imagine this has anything to do with it, because it works as expected locally, and it didn't change for v1.1, but here's the routing code:
https://github.com/POPWorldMedia/POPForums/blob/master/src/PopForums.Web/Areas/Forums/Extensions/RouteBuilders.cs
Well, after redeploying twice, this resolved itself. That's even more concerning, that routing would break like that, and that it didn't.
Orchard1.3 installed on Azure. Have built from source
How do I get a nice download link (which doesn't work, but from googling I think should work on single hosted machine) like:
http://www.davemateer.com/media/Default/CodeCamp2012/CodeCampPresentation.zip
instead of this one (which does work)
https://mateerstorage3.blob.core.windows.net/media/Default/CodeCamp2012/CodeCampPresentation.zip
Cheers
Dave
Write a module that exposes its own routes, and proxy the contents through there. It's going to have horrendous performance but it will work.
I wrote my own LSP which is working fine. However, I can not catch dns queries. For example there is no function like WSPGetHostByName or WSPGetAddrInfo.
My lsp also supports UDP protocol but it is not working. If I run nslookup from console (cmd.exe) it seems working but i can not catch gethostbyname. Does anyone know how to do that? I don't think writing NSP (Name Service Provider) is a solution. But I might be wrong.
Thanks
We have developed a LSP that can "intercept" DNS queries. The only way to do it is by hooking into all of the DNS functions, keep in mind there are a few challenges you need to solve:
You need to use a good hooking library that will support both 32bit and 64bit code.
The library license must be right for your application, there are some free libraries, but can be used freely only with free projects.
When you hook the functions, you need to make sure not to modify certain values that are not IP based and defer the query to the real function.
Intercepting UDP will not work since the queries are going out from MS DNS client, so unless you write a low level driver like: TDI, NDIS or WFP you must hook the functions (or write a NSP). NSLookup works for you because it creates the DNS queries itself.
My solution would be as follows:
Take the well known web browser: firefox.exe
copy it into a new name: icefoxy.exe
modify the EXE so it will load a custom DLL.
I have already done this a few months ago, but since Firefox is constantly getting updates, that means:
EITHER: keep one version and do not update (at your own risk, may cause security problems since that means vulnerabilities will not be fixed)
OR: Update your modification every time firefox.exe changes.
The DLL can easily be written using Delphi.
The Firefox modification needs assembly language, unless you know how to download all necessary files to compile firefox yourself, have access to a C/C++ compiler (likely mingw-gcc), and be prepared of the fact that there are 2 mutually exclusive standards of C++, and if your g++ (part of the gcc suite) is incompatible with your Firefox source, then your attempt will fail.
I am not a C++ expert myself, so I took the (for me, at least) easier route using machine language, that way I do not need to be a C/C++ expert to get the job done.
Some relative points:
What functions must be hooked to intercept all Firefox's access to dns server(s) ?
I noticed, that if you load a Delphi DLL into Icefoxy.exe (a renamed copy of Firefox.exe)
then a Delphi form's colors are missing, eg. if you set (either in object ispector or in code):
Label1.Color := clLime;
you still see a label withOUT lime background color. I do not know the exact reason, but it seems that Delphi VCL is relying to be used in an EXE, and when you use Delphi VCL components inside a DLL instead of an EXE, some things (such as color) does not work as intended.
I'd be happy to post my code (both assembly language modifications to Firefox and the Delphi DLL source code) , but how/where can I post it so it is publicly viewable ?
I used Delphi 7 to make the DLL.
if you use Delphi 2009 or later, you need to take extra care that any string data passed between the Delphi code and any non-Delphi code has the correct encoding, due to the fact that In Delphi 2009 and all newer versions, the type String is an alias to unicodestring, where in older Delphi versions, the type String is an alias to AnsiString.
At the time I did this, it was just a small experiment to find out if I can force Firefox to load my own DLL inti it's process address space.
Another interesting idea would be to get access to the DOM (Document Object Model) of Firefox from a Delphi DLL, that would give a working alternative to using TWebBrowser (based on ActiveX version of Microsoft's Internet Explorer).
I know there have been components like TWebBrowser based on Firefox, but their problem is that nobody cared to update them for a very long time, so they are compatible only with some very outdated version of Firefox.
I have a problem with IIS 6.0 ceasing to work for an ASP.NET application after installing Service Pack 1 for .NET 3.5.
I have 2 identical virtual dedicated servers. Installing SP1 on the first had no adverse effect. Installing it on the second caused ASP.NET pages to start returning 404 page not found.
Static .html pages working okay on both servers.
Has anybody else experienced this?
This is broad problem, so let's start by asking some troubleshooting questions:
Based on your description, the ASP.NET runtime is not catching your request and processing the aspx files. You may need to register the asp.net pipeline with IIS again using ASPNET_REGIIS -i.
Have you made sure that the app_offline.htm file has been removed
from the directory of the application?
I have had this happen before after an
update.
Have you setup fiddler for instance to follow the request to see what is
exactly being requested?
Make sure ASP.NET is enabled in the IIS Administration Console under "Web
Service Extensions." Make sure everything is set to allowed for your different versions of the framework.
Well, let's start with those and hopefully we can guide you to the problem.
I've seen various people with this problem recently. This link might help.
And this one.
And a few others.
Is CustomErrors in your web.config set to On or RemoteOnly? If so, what do you get when you change it to Off?
I have not had this exact error with .NET 3.5 SP1, but have seen similar occur in the past. Typically it can be resolved by opening a command prompt, going to the appropriate .NET folder and running ASPNET_REGIIS -i. In the case of .NET 3.5 there wasn't an update to the main bits of the framework, so you'd actually go to the .NET 2.0 folder, which on my machine can be found at:
\Windows\Microsoft.Net\framework\v2.0.50727
Running the ASPNET_REGIIS -i will re-register all the ASP.NET libraries with IIS, and should be the equivalent of a re-install of the framework on a given machine (as far as IIS is concerned)
Just to clarify. The last (4th) point given by Dale was the problem. During the installation of SP1 the Status for ASP.NET and WebDAV became set to Prohibited under Web Service Extensions.
Why the installation of SP1 changed this setting on one server and not the other is a mystery that I wouldn't mind (but not expect) an answer to...
The second link provided by CodingTheWheel also had the answer so I'm also going to mark this as an answer.
No-one did before, so I'll point to the trivial solution:
Have you already de-installed the Service Pack and re-installed it again (or the whole framework)?
Edit: #Kev:
Easy explanation: He said the update works on one machine, but not on the other. I had similar problems in the past and re-installing helped to solve some of them. And it is trivial to do.
That's my approach:
1. trivial
2. easy
3. headache
You are right, on productive systems you must be careful, but that's his decision. And because it is a virtual server, maybe it is easy for him to copy it and try as a test environment first.