DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   ASP.NET (http://www.daniweb.com/forums/forum18.html)
-   -   Detecting if ASP/ASP.NET is registered (http://www.daniweb.com/forums/thread160420.html)

Ekaterina Dec 2nd, 2008 10:47 am
Detecting if ASP/ASP.NET is registered
 
How can I detect if ASP.NET is registered or not (programmatically)?

I've read a lot of posts about checking register, for example:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET\..., but I have not this key at all, and
about existing the folder "C:\Inetpub\wwwroot\aspnet_client"(but it can be absent)

Also I can't use the Metabase.xml because it has different structure for IIS 6.0 and 7.0.

I need errorless variant to detect it.

Thanks, Ekaterina

dickersonka Dec 2nd, 2008 11:16 am
Re: Detecting if ASP/ASP.NET is registered
 
here's a link that will point you in the right direction for asp.net and iis

http://geekswithblogs.net/sdorman/ar...01/107732.aspx

Ekaterina Dec 2nd, 2008 11:53 am
Re: Detecting if ASP/ASP.NET is registered
 
Thanks for answer, but I've mentioned in my previous question that I have registered ASP.NET but keys (e.g .NET 2.0 - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET\2.0.50727.0) are absent in my registry.

dickersonka Dec 2nd, 2008 11:57 am
Re: Detecting if ASP/ASP.NET is registered
 
hmmm very weird

try this then
from your .net framework folder, normally
c:\windows\Microsoft.NET\Framework\v2.0.50727 (may be different version)

run this

aspnet_regiis.exe -lv

Ekaterina Dec 2nd, 2008 12:07 pm
Re: Detecting if ASP/ASP.NET is registered
 
aspnet_regiis -lv :
2.0.50727.0 Valid (Root) C:\WIN64\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll

But If I uninstall all version of ASP.NET: (aspnet_regiis -ua) I will get just message after calling aspnet_regiis -lv : "Cannot find any installed version" and this is not useful for localized system(if check string after calling command)

dickersonka Dec 2nd, 2008 12:12 pm
Re: Detecting if ASP/ASP.NET is registered
 
maybe i just don't get what you are wanting

you said you wanted to know if asp.net was registered or not, i don't get what you are wanting past that

let me know and i'll do my best to help

Ekaterina Dec 2nd, 2008 12:27 pm
Re: Detecting if ASP/ASP.NET is registered
 
I want to detect if ASP.NET is registered or not from code? It is very important that just from code. May be you know appropriate API to do this (.NET), because I can't find suitable one.

jbennet Dec 2nd, 2008 12:33 pm
Re: Detecting if ASP/ASP.NET is registered
 
Cant you use WMI to query the IIS server to see if it has support for ASP and/or ASP.NET scripting?

dickersonka Dec 2nd, 2008 12:37 pm
Re: Detecting if ASP/ASP.NET is registered
 
you'll need to combine two things to do this, as far as i know

call the process from code
http://www.tech-archive.net/Archive/.../msg00054.html

and redirect standardoutput and parse the results
http://www.vbforums.com/showthread.php?t=381405

i think this should be more in a installer package or something along those lines, but hey

sierrainfo Dec 3rd, 2008 3:19 am
Re: Detecting if ASP/ASP.NET is registered
 
see the link

http://www.west-wind.com/WebLog/posts/1646.aspx


All times are GMT -4. The time now is 3:32 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC