Newbie to ASP

  • Thread starter Thread starter Microsoft
  • Start date Start date
M

Microsoft

I'd like to stop using VB Gui's and make my apps available to a web page
Alot of what I do uses WMI.

How difficult would it be to move the apps to ASP.NET? Any good guides on
this?
 
Your programming model changes as web pages behave differently from forms.
But your WMI parts should still be very similar if you use the
system.management namespace.

Rgds,
Anand M
http://www.dotnetindia.com
 
Anand,
Your programming model changes as web pages behave differently from forms.
But your WMI parts should still be very similar if you use the
system.management namespace.
Are you sure of this, and when that is like that, can you than sent me a
sample and your IP adres?

:-)

Cor
 
The sentence about the IP adres makes no sense, however I assume that you
understand what I mean?

Cor
 
Cor Ligthert said:
The sentence about the IP adres makes no sense, however I assume that you
understand what I mean?

What do you mean?
 
The sentence about the IP adres makes no sense, however I assume that you
What do you mean?

--
Do you have as well a sample how I can using a webpage (IE) investigate the
computer of the client using WMI? (Not with an ActiveX of course only VBNet)

Please show it here, than I show you a very interesting new webpage.

Cor
 
Cor Ligthert said:
Do you have as well a sample how I can using a webpage (IE) investigate
the computer of the client using WMI? (Not with an ActiveX of course only
VBNet)


I don't see a reason why this should not work using an ASP.NET (".aspx")
page. The difference is that the application is executed on the server and
thus will work with the server's WMI.
 
You mean something like this:

'ASPX Web Page
Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles MyBase.Load
Dim options As New ConnectionOptions
options.Username = username 'entered from aspx screen
options.Password = password 'entered from aspx screen
Dim scope As New ManagementScope("\\" + server + "\root\cimv2", options)
'server entered from aspx screen
Try
scope.Connect()
Dim disk As New ManagementObject(scope, _
New ManagementPath("Win32_logicaldisk='c:'"), Nothing)
disk.Get()
Page.Response.Write(disk.ToString())
Catch
Page.Response.Write("** ERROR **")
End Try
End Sub
 
The sentence about the IP adres makes no sense, however I assume that
I don't see a reason why this should not work using an ASP.NET (".aspx")
page. The difference is that the application is executed on the server
and thus will work with the server's WMI.
And you want to say that the answer from Anand is conform that? Which means
that using WMI in a windowsclient application has no difference when that
becomes a webpage.

The only situation is for that can be when it is a program which purpose is
to do administration on the server. That limit is not in the answer. (And
even than it can be in my opinion a potential risk because you have to give
the ASPNET client administrator rights).

Cor
 
Cor Ligthert said:
And you want to say that the answer from Anand is conform that? Which
means that using WMI in a windowsclient application has no difference when
that becomes a webpage.

Yes, as long as the OP doesn't describe the scenario in more detail.
 
This sample is very close to the type of stuff I want
to do... One
question.. will the name and password be passed by
clear text to anywhere?
 
The only situation is for that can be when it is a program which purpose
is
to do administration on the server. That limit is not in the answer. (And
even than it can be in my opinion a potential risk because you have to give
the ASPNET client administrator rights).

Not really. You can use windows authentication in IIS/ASP.NET. Once
authenticated and authorized, the thread can then impersonate me (the admin)
to do the querying through out the network. All this is done by the
IIS/ASP.NET framework. There would be very little security risk, at least
not any more than having the windows client on my machine and it grabbing my
security context from my windows login session to do the querying through
out the network. Reason being both logging into the IIS under this
configuration and using the windows client on the desktop both use the same
authentication/authorization mechanism.
 
I'll quote my other message on how I would do it:

"You can use windows authentication in IIS/ASP.NET. Once
authenticated and authorized, the thread can then impersonate me (the admin)
to do the querying through out the network."

Do a search on MSDN for ASP.NET Security Practices and you will find plenty
of info.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top