Showing posts with label available. Show all posts
Showing posts with label available. Show all posts

Saturday, March 31, 2012

Web Server Controls, Custom or

I'm relatively new to ASP .NET. While using all of the existing Web server controls available in the VS Designer I find myself wondering where are the fancy controls you see on some of the public web sites, such as Buttons with rounded corners, Tabbed pages, menus, etc. Do they have to be created as Custom Controls using the GDI ? Where does Dreamweaver fall into this issue? I have seen a few articles talking about the new version of Dreamweaver being used with .NET. Could anyone point me in the right direction to find out about using or creating these controls.
Thanks
CodeHead.
Well dreamweaver is nothing but an editor, which means just like FrontPage, or any other text editor that supports asp.net tags.
regards

Alot of the controls you are looking for are freely available. the microsoftInternet Explorer Controls for example, which include tab, treeview etc. Same goes for menus like theskmMenu and my own favorite theexcentrics world controls. All of these are free and can easily be put on your page.
Thanks to all, especially the links to all of the controls. Very Helpful !

Wednesday, March 28, 2012

Web service - how to?

Hi
I would like to access an ms access database located at a web site from my
desktop via web service. Is there some information available on how to do
that? Would the web service run on a shared hosting web account?
Thanks
RegardsWhere ever the web service is running will have to have file level access to
the DB, is this possible with your setup?
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"John" <john@.nospam.infovis.co.uk> wrote in message
news:%23wQKuMDPEHA.1312@.TK2MSFTNGP12.phx.gbl...
> Hi
> I would like to access an ms access database located at a web site from my
> desktop via web service. Is there some information available on how to do
> that? Would the web service run on a shared hosting web account?
> Thanks
> Regards
>
Think of a web service as a special purpose web page with a predefined
URL and output. Let's say you wrote an ASP page that would take an ID
from the URL, get some data from the database and display it on the
screen. Now, take the URL and replace it with a special XML string,
and wrap the result up the same way and you have a web service.
The Web Service code is just another ASPX page (with a different
extension and a few more lines of code). Therefore, whatever you would
need to do to get to the database in an ASPX page, you would need to
do in a web service.
On Mon, 17 May 2004 18:19:06 +0100, "John" <john@.nospam.infovis.co.uk>
wrote:

>Hi
>I would like to access an ms access database located at a web site from my
>desktop via web service. Is there some information available on how to do
>that? Would the web service run on a shared hosting web account?
>Thanks
>Regards
>

Web service - how to?

Hi

I would like to access an ms access database located at a web site from my
desktop via web service. Is there some information available on how to do
that? Would the web service run on a shared hosting web account?

Thanks

RegardsWhere ever the web service is running will have to have file level access to
the DB, is this possible with your setup?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com

"John" <john@.nospam.infovis.co.uk> wrote in message
news:%23wQKuMDPEHA.1312@.TK2MSFTNGP12.phx.gbl...
> Hi
> I would like to access an ms access database located at a web site from my
> desktop via web service. Is there some information available on how to do
> that? Would the web service run on a shared hosting web account?
> Thanks
> Regards
Think of a web service as a special purpose web page with a predefined
URL and output. Let's say you wrote an ASP page that would take an ID
from the URL, get some data from the database and display it on the
screen. Now, take the URL and replace it with a special XML string,
and wrap the result up the same way and you have a web service.

The Web Service code is just another ASPX page (with a different
extension and a few more lines of code). Therefore, whatever you would
need to do to get to the database in an ASPX page, you would need to
do in a web service.

On Mon, 17 May 2004 18:19:06 +0100, "John" <john@.nospam.infovis.co.uk>
wrote:

>Hi
>I would like to access an ms access database located at a web site from my
>desktop via web service. Is there some information available on how to do
>that? Would the web service run on a shared hosting web account?
>Thanks
>Regards

Monday, March 26, 2012

Web service does not show up while adding web reference

Hi,
If I create a Virtual directory with application name
programmatically it will not show up in the available web
services while adding web reference(Dynamic discovery
fails).

Where as if I create the virtual directory manually it
will shown up while adding web reference.

I have used the following code to create it
programmatically on IIS 5.0

I have checked the property pages of virtual directory
created using both the methods they look same.

Set IIsWebVDirRootObj = GetObject
("IIS://LocalHost/W3SVC/1/Root")
Set IIsWebVDirObj = IIsWebVDirRootObj.Create
("IIsWebVirtualDir", "MySecureAPP")

IIsWebVDirObj.Put "Path", "C:\MySecure"
IIsWebVDirObj.Put "AccessRead", True
IIsWebVDirObj.Put "AccessScript", True
IIsWebVDirObj.Put "AppIsolated",2

IIsWebVDirObj.AppCreate2 1
IIsWebVDirObj.Put "AppFriendlyName", "MySecureAPP"
IIsWebVDirObj.SetInfo

Thanks
KiranJust wondering is this in WSH?
What Language?

"Kiran" <kiranjoseph74@.hotmail.com> wrote in message
news:011501c36807$f4561d90$a401280a@.phx.gbl...
> Hi,
> If I create a Virtual directory with application name
> programmatically it will not show up in the available web
> services while adding web reference(Dynamic discovery
> fails).
> Where as if I create the virtual directory manually it
> will shown up while adding web reference.
> I have used the following code to create it
> programmatically on IIS 5.0
> I have checked the property pages of virtual directory
> created using both the methods they look same.
> Set IIsWebVDirRootObj = GetObject
> ("IIS://LocalHost/W3SVC/1/Root")
> Set IIsWebVDirObj = IIsWebVDirRootObj.Create
> ("IIsWebVirtualDir", "MySecureAPP")
> IIsWebVDirObj.Put "Path", "C:\MySecure"
> IIsWebVDirObj.Put "AccessRead", True
> IIsWebVDirObj.Put "AccessScript", True
> IIsWebVDirObj.Put "AppIsolated",2
> IIsWebVDirObj.AppCreate2 1
> IIsWebVDirObj.Put "AppFriendlyName", "MySecureAPP"
> IIsWebVDirObj.SetInfo
>
> Thanks
> Kiran
This is VbScript that uses ADSI objects.
I have tried with C# too, but the same problem exiits

C# Code
DirectoryEntry IISRoot = new DirectoryEntry("IIS://" +
m_strServer + "/W3SVC/1/Root");
DirectoryEntry newDir =
IISRoot.Children.Add( m_strVDirName, "IIsWebVirtualDir");
newDir.Properties["Path"]
[0] = m_strVDirPath;
newDir.Properties
["AccessFlags"][0] = "513";
newDir.Properties
["AppIsolated"][0] = "2";
//newDir.Properties
["AccessWrite"][0] = "True";
newDir.Properties
["AppFriendlyName"][0] = m_strVDirName;
newDir.Invoke
( "AppCreate", true );
newDir.CommitChanges();

Thanks
Kiran

>--Original Message--
>Just wondering is this in WSH?
>What Language?
>"Kiran" <kiranjoseph74@.hotmail.com> wrote in message
>news:011501c36807$f4561d90$a401280a@.phx.gbl...
>> Hi,
>> If I create a Virtual directory with application name
>> programmatically it will not show up in the available
web
>> services while adding web reference(Dynamic discovery
>> fails).
>>
>> Where as if I create the virtual directory manually it
>> will shown up while adding web reference.
>>
>> I have used the following code to create it
>> programmatically on IIS 5.0
>>
>> I have checked the property pages of virtual directory
>> created using both the methods they look same.
>>
>> Set IIsWebVDirRootObj = GetObject
>> ("IIS://LocalHost/W3SVC/1/Root")
>> Set IIsWebVDirObj = IIsWebVDirRootObj.Create
>> ("IIsWebVirtualDir", "MySecureAPP")
>>
>> IIsWebVDirObj.Put "Path", "C:\MySecure"
>> IIsWebVDirObj.Put "AccessRead", True
>> IIsWebVDirObj.Put "AccessScript", True
>> IIsWebVDirObj.Put "AppIsolated",2
>>
>> IIsWebVDirObj.AppCreate2 1
>> IIsWebVDirObj.Put "AppFriendlyName", "MySecureAPP"
>> IIsWebVDirObj.SetInfo
>>
>>
>>
>> Thanks
>> Kiran
>>
>>
>
>.
Did you have any asmx files in the Virtual folder? Additionally, What did
you mean "Dynamic discovery", "Browse to
Web services on the local machine " in VS.NET 2003?

Luke

"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026?? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
http://www.microsoft.com/security/s...ns/ms03-026.asp and/or to
visit Windows Update at http://windowsupdate.microsoft.com to install the
patch. Running the SCAN program from the Windows Update site will help to
insure you are current with all security patches, not just MS03-026."

Saturday, March 24, 2012

Web Service for Sql Connections

I want to have a function available to multiple apps that creates connections to our sql server 7 database (they do not want to upgrade to 2000 or 2005 yet). My questions are:

Is it safe to put functions that connect to the db in a web service?

Should I have any additional security measures in place?

Here is a sample of one I converted to be potentially used:

Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Data.SqlClient

<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class WebService
Inherits System.Web.Services.WebService
Public globConnection As SqlConnection
Public gstrDBName As String
Public gstrSwitchboardPath As String
Public gstrHelpPath As String

<WebMethod()> _

'This Module is the ONLY access to the SQL Server
'It is using NT Authentication to permit access
'If the user is not a Valid NT user access is Denied
'If the user has not been granted permission to the SQL server access will be Denied

Public Function ConnectToDB() As Boolean

Dim BoolState As Boolean
Dim strConnection As String

gstrDBName = "DBNAME"

strConnection = "Provider=SQLOLEDB.1;" & _
"Data Source= SERVERNAME;Initial Catalog= " & gstrDBName & ";" & _
"Integrated Security=SSPI "
On Error Resume Next

If globConnection Is Nothing Then
globConnection = New SqlConnection
End If

If globConnection.State = Data.ConnectionState.Open Then
BoolState = True
Else
globConnection = New SqlConnection
globConnection.ConnectionString = strConnection
globConnection.Open()
If globConnection.State = Data.ConnectionState.Open Then
BoolState = True
Else
BoolState = False
End If
End If
ConnectToDB = BoolState
End Function 'ConnectToDB

End Class

Any input, suggestions, etc would be greatly appreciated.its fine so long as the public methods you expose through your webservice don't open the door for someone to send in malicious code..

for example, if your webservice exposed a routine that allowed you to pass a SQL string to it and run that against your DB, that would be a bad risk, because someone could easily pass a string to delete all your tables.

You may also want to disallow public access to your service or have authentication of some sort for the users of the service.
We use all stored procedures, no hard coding SQL into any of our code. Our VB 6.0 security Model looks something like this currently:

Database
Stored Procedure
Class
Module
Application

I am trying to figure out how to implement similar security layers in ASP 2.0 and be able to use alot of the newer functionality, improve scalability (they want to roll this stuff out to multiple US and International - eventually - clients) without having to install cumbersome applications that require local support when users hose them up entirely or have to worry about how much memory, etc they have. Connectivity is not an issue because if they lose connectivity to us it does not matter what they use. I have been studying this article:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/secnetch03.asp
If there are any other decent articles out there, can I get links to them?

Thank you very much.
hows about this one

http://msdn2.microsoft.com/en-us/library/w67h0dw7.aspx
Ok, I have security squared away...I think hehe. Now I run into a bigger problem - connecting a gridview to SQL Server 7.0. I know that it cannot be done directly and I have to use a dataset, however I cannot seem to figure out the right configuration of parameters and/or syntax to make it happen. Any help? Here is what I have so far that is not utterly ridiculous:

Public globConnection As SqlConnection
Public globDS As SqlDataSource

Public Function ConnectToDS() As SqlDataSource
Dim strConnection As String
gstrDBName = "DBNAME"

strConnection = "Provider=SQLOLEDB.1;" & _
"Data Source= ServerName;Initial Catalog= " & gstrDBName & ";" & _
"Integrated Security=SSPI "

If globConnection Is Nothing Then
globConnection = New SqlConnection
End If

globDS.ConnectionString = strConnection

ConnectToDS = globDS
End Function

I have been and continue to look on the web. The only thing I have found a reference to is caching...not alot of detail just reference. Again, any suggestions, pointers and guidance is muchly appreciated.
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.aspx