Showing posts with label forms. Show all posts
Showing posts with label forms. Show all posts

Friday, February 24, 2012

ASPNET user in MSDE

Hello.

I am using MSDE in an ASP .NET application using forms authentication in order to the user can visit my website anonymously but have to authenticate in some pages.

Web server and MSDE server are in the same computer.

I would like to know how role I should set for the ASPNET sql server user. I am using Microsoft SQL Web Data Administrator and when I am creating the ASPNET user, then a page with some roles is shown.

Roles like public (default), db_owner, db_accessadmin, db_datareader, db_datawriter...

I had applied db_datareader and db_datawriter but now, when I use store procedures in my code, an error is made so I have applied db_owner role for the ASPNET user.

Is this correct or db_owner is a excessive privileged role for the ASPNET user?

Thank you and sorry for my English.DONT EVER GIVE THAT USER DB_OWNER!! You're setting yourself up for sql inject attacks.

The best thing to do is create a role named WebUser and add the asp.net user to that role. Then grant execute permissions to the user.

Here's the script that you need:

exec sp_addrole 'WebUser'
go
exec sp_addrolemember 'WebUser', 'MACHINENAME\ASPNET'
go
grant execute on PROCNAME to WebUser

Sunday, February 19, 2012

ASP.NET-Report Viewer-Internet

Hi,
I am planning to use Report viewer web control in my web application and
going to use forms authenthication. What roles need to assign in RS and what
are the other settings need to be done.
Thanks & Rgds,
AruThe roles settings are no different between forms authentication and Windows
authentication. The settings for forms authentication are described here:
http://msdn.microsoft.com/library/?url=/library/en-us/dnsql2k/html/ufairs.asp?frame=true#ufairs
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"Aru" <Aru@.discussions.microsoft.com> wrote in message
news:5B452DEB-E608-4814-B15B-5842E016B9F4@.microsoft.com...
> Hi,
> I am planning to use Report viewer web control in my web application and
> going to use forms authenthication. What roles need to assign in RS and
> what
> are the other settings need to be done.
> Thanks & Rgds,
> Aru

Monday, February 13, 2012

ASP.NET or Sharepoint for SQL Server 2005 access?

I've got existing data stored on a SQL 2000 Server, and want to move to SQL Server 2005 Std.

I want to design a website with forms to look up, edit and add new data to the SQL server. I have specific pages in mind, i.e. a page for scanning in S/Ns for products, a page for allocating products that are in stock, etc.

Is Sharepoint capable of allowing access to SQL server and letting me design such custom pages? Or should I go with Visual C# and use ASP.NET to create the kind of site that I want?

i do not think that sharepoint alone will help you, you might have to use Infopath forms to use the sharepoint option. Or you could right some custome web parts to plug into the sharepoint system. My advice (My own point of view) is that you would be better creating your own custom solution using asp.net, this way you will have more control of the editing of the data. Also with the way that ASP.Net 2.0 is you can do some really quick development using the build in controls. Remember if you are going to ask some specific questions about asp.net you should direct you browser to http://forums.asp.net as this is where most of the asp teams hang out.

|||

I have configured SharedPoint 2007 server with sql server 2005. In this environment you can create portals, blogs and manage enterprise contents. For your requirements you can simply use SharedPoint 2007 server and sql server 2005 and then can whatever you wnat. Don miss it.

Note: you can write vast programming in this environment also with C# for managing your web pages/outlooks/etc...

Shahidul Haque.

Thursday, February 9, 2012

ASP.Net 2.0 Application Connection to SQL Server 2005 - Setup Questions

All:

I am writing an Internet/Extranet based (ASP.Net 2.0) web application that uses SQL server 2005 as the database. I am using forms authentication on my web application. I am also storing the connection string to SQL server in my web config file. The conn string is encrypted using DPAPI with entropy. I currently have created a SQL login account on my SQL server for use by the web application. This is the user ID I am using in my conn string. The reason for this is because all persons using the application will NOT have a windows login.

Here is my question: The login I created currently has defaulted to the "dbo" role and therefore has "dbo" rights to the database. I want to setup up this login accountso that all it can do is execute stored procedures. I dont want this SQL login to be able to do anything else. In my application I am using stored procedures for ALL data access functions, via a data access layer in my application. Can someone guide me step by step as to how to setup this type of access for this SQL login.

Thanks,

Blue.

The dbo user/role rights cannot be changed at all. It is the intrinsic owner of all objects in sql server and has access to all of them, whether you want it or not.

What you need to do, is to create your own sql server user, something like "MyApplicationUser", that only has exec access toyour stored procedures.

Don't go messing around with the dbo user, you can mess up your sql server installation really fast.

|||

Yes that is what I have done. I created a SQL server user/login. The only issue is when I created this I did not assign to any roles except public. Currently I have NOT granted explicit permissions to this login, to any objects, yet it is still able to run the SP's. When I look at the login I created, it states that the default schema is "dbo", therefore it is giving this login way more access then it needs.

|||

Still need help, anyone have any ideas or help? Please!

|||

Hi,

You may create your own role and add your user to that role. Here's the articles for you to refer.

http://msdn2.microsoft.com/en-us/library/ms187936(SQL.90).aspx

http://msdn2.microsoft.com/en-us/library/ms173463(SQL.90).aspx

Thanks.