Tuesday, March 27, 2012
Derived types and backend.
the client app(s) could derive there own types as needed but also store
their derivations so they can deserialize them. Is there a pattern for
this? What I am thinking now is simple example like:
public interface IVehicle
{
string Name
{
get;
set;
}
string Type
{
get;
set;
}
string Guid
{
get;
set;
}
public class Vehicle : IVehicle
{
private string name;
private string type;
private string data;
public string Name { get/set imp }
public string Type { get/set imp } // Derived type name. Used by
client to know how to deserilize Data.
public string Data { get/set imp} // Derived types xml.
}
So server knows about the Vehicle type and that is all. It can store three
columns: Name, Type, and Data.
If a client just wants to use Vehicle(s) then it is all set. However, it
may want to derive a Corvette or some other vehicle from base like so.
public class Corvette : IVehicle
{
private string name;
private string type;
private string data;
// Derived fields.
private string color;
public string Name { get/set imp }
public string Type { get/set imp }
public string Data { get/set imp}
public string Color { get/set imp}
public Corvette() { }
public Corvette(Vehicle vehicle) { //create a corvette from a vehicle. }
}
So I can get Vehicles from the server and create Corvettes on the client
side. However I need to store back a Corvette on the server, but the server
only knows about Vehicle type. So I am thinking serialize the Corvette type
into xml string, create a new Vehicle using same Name. Set vehicle.Type to
"Corvette" and store xml string in vehicle.Data. Now send the Vehicle type
to server for storage in SQL using the 3 columns in Vehicle. Now if the
client needs Corvette type, it gets the Vehicle, checks the Type and
deserializes the Data string into Corvette type and uses it. So that is the
round trip. Not pretty, but only way I can figure so far to do it. Any
ideas? TIA
William Stacey [MVP]
William Stacey [MVP]
There was an MSDN article written by Andrew Conrad that covers a scenario
very close to what you want to do. He uses an xml overflow column to store
the additional properties of the subclass.
"Death, Taxes, and Relational Databases, Part 1"
http://msdn.microsoft.com/library/de...ml04212003.asp
Specifically the section entitled: "Extending the Business Objects"
"William Stacey [MVP]" wrote:
> I want the server side (sql and business logic) to know about one type. And
> the client app(s) could derive there own types as needed but also store
> their derivations so they can deserialize them. Is there a pattern for
> this? What I am thinking now is simple example like:
> public interface IVehicle
> {
> string Name
> {
> get;
> set;
> }
> string Type
> {
> get;
> set;
> }
> string Guid
> {
> get;
> set;
> }
> public class Vehicle : IVehicle
> {
> private string name;
> private string type;
> private string data;
> public string Name { get/set imp }
> public string Type { get/set imp } // Derived type name. Used by
> client to know how to deserilize Data.
> public string Data { get/set imp} // Derived types xml.
> }
> So server knows about the Vehicle type and that is all. It can store three
> columns: Name, Type, and Data.
> If a client just wants to use Vehicle(s) then it is all set. However, it
> may want to derive a Corvette or some other vehicle from base like so.
> public class Corvette : IVehicle
> {
> private string name;
> private string type;
> private string data;
> // Derived fields.
> private string color;
> public string Name { get/set imp }
> public string Type { get/set imp }
> public string Data { get/set imp}
> public string Color { get/set imp}
> public Corvette() { }
> public Corvette(Vehicle vehicle) { //create a corvette from a vehicle. }
> }
> So I can get Vehicles from the server and create Corvettes on the client
> side. However I need to store back a Corvette on the server, but the server
> only knows about Vehicle type. So I am thinking serialize the Corvette type
> into xml string, create a new Vehicle using same Name. Set vehicle.Type to
> "Corvette" and store xml string in vehicle.Data. Now send the Vehicle type
> to server for storage in SQL using the 3 columns in Vehicle. Now if the
> client needs Corvette type, it gets the Vehicle, checks the Type and
> deserializes the Data string into Corvette type and uses it. So that is the
> round trip. Not pretty, but only way I can figure so far to do it. Any
> ideas? TIA
> --
> William Stacey [MVP]
> --
> William Stacey [MVP]
>
>
|||Thanks Todd. :-)
William Stacey [MVP]
"Todd Pfleiger [MSFT]" <ToddPfleigerMSFT@.discussions.microsoft.com> wrote in
message news:3B2852EA-495E-4D03-8CD7-10646EEF42E4@.microsoft.com...[vbcol=seagreen]
> There was an MSDN article written by Andrew Conrad that covers a scenario
> very close to what you want to do. He uses an xml overflow column to store
> the additional properties of the subclass.
> "Death, Taxes, and Relational Databases, Part 1"
> http://msdn.microsoft.com/library/de...ml04212003.asp
> Specifically the section entitled: "Extending the Business Objects"
>
> "William Stacey [MVP]" wrote:
Derived types and backend.
the client app(s) could derive there own types as needed but also store
their derivations so they can deserialize them. Is there a pattern for
this? What I am thinking now is simple example like:
public interface IVehicle
{
string Name
{
get;
set;
}
string Type
{
get;
set;
}
string Guid
{
get;
set;
}
public class Vehicle : IVehicle
{
private string name;
private string type;
private string data;
public string Name { get/set imp }
public string Type { get/set imp } // Derived type name. Used by
client to know how to deserilize Data.
public string Data { get/set imp} // Derived types xml.
}
So server knows about the Vehicle type and that is all. It can store three
columns: Name, Type, and Data.
If a client just wants to use Vehicle(s) then it is all set. However, it
may want to derive a Corvette or some other vehicle from base like so.
public class Corvette : IVehicle
{
private string name;
private string type;
private string data;
// Derived fields.
private string color;
public string Name { get/set imp }
public string Type { get/set imp }
public string Data { get/set imp}
public string Color { get/set imp}
public Corvette() { }
public Corvette(Vehicle vehicle) { //create a corvette from a vehicle. }
}
So I can get Vehicles from the server and create Corvettes on the client
side. However I need to store back a Corvette on the server, but the server
only knows about Vehicle type. So I am thinking serialize the Corvette type
into xml string, create a new Vehicle using same Name. Set vehicle.Type to
"Corvette" and store xml string in vehicle.Data. Now send the Vehicle type
to server for storage in SQL using the 3 columns in Vehicle. Now if the
client needs Corvette type, it gets the Vehicle, checks the Type and
deserializes the Data string into Corvette type and uses it. So that is the
round trip. Not pretty, but only way I can figure so far to do it. Any
ideas? TIA
--
William Stacey [MVP]
William Stacey [MVP]There was an MSDN article written by Andrew Conrad that covers a scenario
very close to what you want to do. He uses an xml overflow column to store
the additional properties of the subclass.
"Death, Taxes, and Relational Databases, Part 1"
http://msdn.microsoft.com/library/d.../>
4212003.asp
Specifically the section entitled: "Extending the Business Objects"
"William Stacey [MVP]" wrote:
> I want the server side (sql and business logic) to know about one type. A
nd
> the client app(s) could derive there own types as needed but also store
> their derivations so they can deserialize them. Is there a pattern for
> this? What I am thinking now is simple example like:
> public interface IVehicle
> {
> string Name
> {
> get;
> set;
> }
> string Type
> {
> get;
> set;
> }
> string Guid
> {
> get;
> set;
> }
> public class Vehicle : IVehicle
> {
> private string name;
> private string type;
> private string data;
> public string Name { get/set imp }
> public string Type { get/set imp } // Derived type name. Used by
> client to know how to deserilize Data.
> public string Data { get/set imp} // Derived types xml.
> }
> So server knows about the Vehicle type and that is all. It can store thre
e
> columns: Name, Type, and Data.
> If a client just wants to use Vehicle(s) then it is all set. However, it
> may want to derive a Corvette or some other vehicle from base like so.
> public class Corvette : IVehicle
> {
> private string name;
> private string type;
> private string data;
> // Derived fields.
> private string color;
> public string Name { get/set imp }
> public string Type { get/set imp }
> public string Data { get/set imp}
> public string Color { get/set imp}
> public Corvette() { }
> public Corvette(Vehicle vehicle) { //create a corvette from a vehicle.
}
> }
> So I can get Vehicles from the server and create Corvettes on the client
> side. However I need to store back a Corvette on the server, but the serv
er
> only knows about Vehicle type. So I am thinking serialize the Corvette ty
pe
> into xml string, create a new Vehicle using same Name. Set vehicle.Type t
o
> "Corvette" and store xml string in vehicle.Data. Now send the Vehicle typ
e
> to server for storage in SQL using the 3 columns in Vehicle. Now if the
> client needs Corvette type, it gets the Vehicle, checks the Type and
> deserializes the Data string into Corvette type and uses it. So that is t
he
> round trip. Not pretty, but only way I can figure so far to do it. Any
> ideas? TIA
> --
> William Stacey [MVP]
> --
> William Stacey [MVP]
>
>|||Thanks Todd. :-)
William Stacey [MVP]
"Todd Pfleiger [MSFT]" <ToddPfleigerMSFT@.discussions.microsoft.com> wrote in
message news:3B2852EA-495E-4D03-8CD7-10646EEF42E4@.microsoft.com...
> There was an MSDN article written by Andrew Conrad that covers a scenario
> very close to what you want to do. He uses an xml overflow column to store
> the additional properties of the subclass.
> "Death, Taxes, and Relational Databases, Part 1"
> http://msdn.microsoft.com/library/d...
l04212003.asp
> Specifically the section entitled: "Extending the Business Objects"
>
> "William Stacey [MVP]" wrote:
>
Thursday, March 22, 2012
Deployment Toolkit worth using?
I've been trying to use the MSDE Deployment Toolkit, with help from
Mario Szpuszta's 3/04 article on MSDN. However, the article does not
include sample code, nor can I find it on the web - all the links I've
located are dead, and Szpuszta seems to have dropped off the face of
the earth. (The samples that come with the kit are NOT the code
Szpuszta refers to in the article.)
I've put together enough of Szpuszta's sample to install the framework
and MSDE as needed, but I can't get the database deployed. The article
leaves out a lot of critical info, so I'd be glad to have the sample
solution he uses.
I guess my real question at this point is: am I wasting my time? Maybe
there's a newer, more preferred way of solving the problem by now. Any
thoughts?
I'll post my own reply, for those who might want it. I located Mario's
blog and sent him a message. He replied with a link to the source for
his demonstration solution (VB.NET). I won't post the whole ugly link -
just go to GotDotNet/UserSamples and search on "MSDE".
MSDE Deployment Toolkit in Action - Sample Files
Deployment problem
Here is the error message:
Another question, would local host work for server id?
Server Error in '/' Application.
------------------------SQL Server does not exist or access denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.Data.SqlClient.SqlException: SQL Server does not exist or access denied.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +474
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState) +44
System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +304
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +77
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +36
ICCSalesTracker.WebForm1.GetRGU() +433
ICCSalesTracker.WebForm1.Page_Load(Object sender, EventArgs e) +7
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750
Also, I took a look at PDB file and it still has my other file paths. Does that matter? Should they be changed?
And lastly, The web server admin does not want to use the inetpub folder so he created a different folder that houses all of the files. What will that effect? What do I have to change?
Please let me know. Thanks!!!!|||Hi,
It sounds like the app worked well on your laptop, but wont work when moved to a server. You need to understand the authentication and authorization scheme the app will use to access the DB. That situation may be different from the one you had on your laptop. You can use Windows Integrated security, if IIS and the SQL Server are on the same computer and the user is in the same domain. For an internet app, the client may not have credentials to pass, or passing them posses a risk, so ASP.NET uses a default user for it's worker process called ASPNET (it's called NETWORK SERVICE by Windows 2003 Server). SQL Server sees this default user and checks to see if it has permission to use that DB. In order to gain access to the DB, the ASPNET (or NETWORK SERVICE), user needs to be registered on the SQL Server and given the appropriate (just enough), permissions to use that DB. There are other factors and schemes, but you might just look to see that the SQL Server DB has the right user set up correctly.
Good luck.|||I added ASPNET & NT AUTHORITY and even my domain user is set to owner. It still will not pull it up.|||Hi,
Was the user in the form "NT_AUTHORITY\NETWORK SERVICE"? I know that worked for me one time on a local setup that didn't accept "thecomputername\NETWORK SERVICE". Also, are you sure that these default users have the correct read/write permissions set?
Some more that know more than I do will probably get you the right answer. If I had to figure it out myself, I might try using a different type of Authentication (Forms), just to see if I could get it working - then figure out how to get the authentication scheme I want working too. You might try writting a very simple data access app (using the Data Web Form wizard), just to test the connection. That way you don't have to messup your project.
Good luck.|||Thank you for your help Brian!
Well I figured out the server name. Apparently, if the server say local when you look at it in Enterprise Manager, you leave the sql servername blank in the connection string. "SERVER/"
Now I"m getting a login failed for user 'NT AUTHORITY\NETWORK SERVICE error even though IIS is set to windows integrated authentication. Is there another place I have to change a setting to ensure it only uses windows authentication?|||Hi,
Glad to hear that you are making some progress - even if my info wasn't much help.
Is the login error message from SQL Server?
In your message it says ...for user 'NT AUTHORITY\NETW...', but I think it should have an underscore between NT and AUTHORITY -- 'NT_AUTHORITY\NETWORK SERVICE'
It seemed odd to me that they connect the first two part name, and leave a blank in the second, but that's the way I saw it on my system. Double check.
Good luck.|||You are correct. I typed it in wrong. I had to add that user to the SQL users directory and now it loads. But now I have yet another problem. The initial page loads. It has an onload function that calls a stored procedure to return the number of units sold for the day. That works just fine. The second part of the page is the order entry function that passes parameters to an insert procedure. When I click on submit, I get an access denied or server not found error. It's wierd because it's using the same connection string as the on load procedure. Do you have any idea what that might be? Thanks for the help!|||Hi,
Looks like you are making progress.
I'm not sure about why the second part of the page wont function. My first guess is that the first part is only reading data, and it sounds like the second part is reading and writing. Are you sure that the user permissions include insert and update allowed?
You need to be very careful with any database access granted to internet users. That's even more the case when you grant write or execute permissions. Keep in mind that it's one thing to get it working, but you'll want to make sure you have the security issues understood and accounted for before you deploy the application. I'm still working my way through this myself. Using stored procedures for the functions that your users will perform is generally a good idea, but they're not a security panacea. You'll have to do some research to find the best safegaurds. I know that MSDN has some series on security best practices, webcasts, etc...
One other thing occurs to me, if you don't have a compelling reason to have both the functions you mentioned on the same aspx page, consider moving the second to another page, with a link from the first. My thought is that it compartmentalizes the functions, and it could make it easier to track down problems, and keep the first function available, even if the other is broken. You'll know if it makes sense to do this in your project.
Let me know how it goes for you.|||All of the required users have permissions to all of the objects in the database. This is an intranet and the security is set to windows integrated. The reason the page has both the on load and on submit function is to track entered units in real time. As they enter in sales, the datagrid tied to the getunit stored procedure runs every time the page loads. So when the sales agent enters in 2 revenue units, datagrid reflects those units when the page reloads. That portion works just fine. However when I click submit, I get the following error
Server Error in '/' Application.
------------------------SQL Server does not exist or access denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.Data.SqlClient.SqlException: SQL Server does not exist or access denied.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SqlException: SQL Server does not exist or access denied.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +474
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
ICCSalesTracker.WebForm1.btnSubmit_Click(Object sender, EventArgs e) +7239
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1292
I'm pretty sure it's not the connection string as that is specified in the web.config file. I'm thinking it has something to do with IIS or something. Thanks for the help! I'll let you know if I figure it out...
Monday, March 19, 2012
Deploying web app, which SQL files do I upload?..
How do I do this?
Thanks~::I need to know how to upload my SQL Server database files to the server.
Ask your provider, systemadministrator or whoever manages this.
Our hosting operation does NOT allow uploads of sql database fiules - you are supposed to create a new database and use the copy database wizard out of SQL Server's enterprise manager.|||hi
i saw http://europe.webmatrixhosting.net, do you know that all hosts provide like this host utilities to work with SQL Server? utilities like http://www.aspenterprisemanager.com??
i'm developing an asp.net storefront that uses SQL Server Database, but i'm worry about after developing that, i want to do what?!! how to manage my database?
tahnk
Deploying SQL Server 2005 Express
Hello
1.) Is there any solution for integrating the deployment of the sql server express into the setup project of my vb 2005 app ? 'Cause it is too much to install the framework... then the sql server and then the app....... Any help would be appreciated!
Thx
This may help:
http://msdn2.microsoft.com/en-us/library/ms165716.aspx
Buck Woody
Deploying SQL Server 2005 Express
Hello
1.) Is there any solution for integrating the deployment of the sql server express into the setup project of my vb 2005 app ? 'Cause it is too much to install the framework... then the sql server and then the app....... Any help would be appreciated!
Thx
This may help:
http://msdn2.microsoft.com/en-us/library/ms165716.aspx
Buck Woody
Friday, March 9, 2012
Deploying Report Server behind web servers
in order to prevent our clients from being able to use url access directly.
My main concern has to do with a chance that a client may attempt to alter
the content of report parameters or otherwise probe around.
Our web code is able to forward requests to the report server and render
reports correctly, but toolbar functionality seems to be broken. The web
developer tells me that the toolbar functionality is too stateful, so
paging (as an example) won't work.
Is what we're trying to do (request forwarding) unsupported? Are my fears
regarding exposing the report server in our DMZ unwarranted? If so, I must
be missing something.What about building your own interfaace or getting the Report Stream from
Reporting Webservice to Qrite the Stream to the browser ? There you could
lock down your reporting server and connect to the RS with special lockedup
credentials.
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--
"JoeA" <joea@.nospam.net> schrieb im Newsbeitrag
news:Xns963D69BAFC14Emailmailcom@.207.46.248.16...
> We'd like to deploy our report servers behind our web tier in the app tier
> in order to prevent our clients from being able to use url access
> directly.
> My main concern has to do with a chance that a client may attempt to alter
> the content of report parameters or otherwise probe around.
> Our web code is able to forward requests to the report server and render
> reports correctly, but toolbar functionality seems to be broken. The web
> developer tells me that the toolbar functionality is too stateful, so
> paging (as an example) won't work.
> Is what we're trying to do (request forwarding) unsupported? Are my fears
> regarding exposing the report server in our DMZ unwarranted? If so, I
> must
> be missing something.|||Thanks for the reply. We have considered that - however we didn't want to
have to recreate all of the goodies in the toolbar.
"Jens Süßmeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote
in news:#1t7uEQRFHA.2136@.TK2MSFTNGP14.phx.gbl:
> What about building your own interfaace or getting the Report Stream
> from Reporting Webservice to Qrite the Stream to the browser ? There
> you could lock down your reporting server and connect to the RS with
> special lockedup credentials.
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
>
Deploying MSDE200 w/ app
using Wise Install. If you've done this before, do you
have any documentation or procedures to set this up? I
would greatly appreciate any help on this.
Thanks in advance,
George
greda@.msn.com
Thanks for your help. I'll check out the links.
George
>--Original Message--
>http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/dnmsde/html/msdedepl.asp
>Check out that website, it has a tutorial on using MS'
MSDE Bootstrapper. This site has useful info on how to
actually tap into the app's installation events and
script a database/drop a database. I personally used a
bootstrap program I found here:
>http://www.codeproject.com/dotnet/dotNetInstaller.asp?
target=dotNetInstaller
>I could never figure out exactly how to use the
Microsoft MSDE Bootstrapper, very very poorly documented,
while the example on how to use it was decent, it seemed
it was skirting past the basics, like instructing whether
the MSDE path you specify is to the correct .MSI, or
Setup.EXE, or whether it worked against MSDE2000 release
A or not, and it never pointed out how to set a
bootstrapper in a projects configuration. Really poor
documentation, I'm sure it's great if you know exactly
how the heck it works. I can't get past that, so some
Italian kid sold me on his bootstrapper, which for
usability and flexibility, it far surpasses the Microsoft
MSDE Bootstrapper.
>My 2 cents.
>.
>
|||Thanks for your help Jim. I'll follow your instructions.
if you have any sample code I can look at, that would
help me tremendously. Its my first time deploying a
product using MSDE2000. I'm wondering how you would
handle multiple users? One CD with MSDE2000 and another
with the client software?
Thanks. George
>--Original Message--
>I've had to do exactly what you are try to accomplish.
>Our company produces and distributes a MSDE based
client - server
>application and we use Wise for the installation
platform. The installation
>process is separated into three stages: 1) Install MSDE
2) Install our
>database and configure users and permissions 3) Install
the application.
>Here's a brief description of what we do.
>For Stage 1 I developed a Wise scritp for installing
MSDE using the MSDE
>setup.exe program. I gather all the need parameters from
the installing user
>and then bootstrap
>setup.exe, install a named instance of MSDE, and wait
for it to exit. I
>examine the return value from the process to see if the
installation
>succeded. If it did I then put a value in the registry
to have the next
>stage of the installation run automatically when the
system reboots. I then
>force a reboot of the system. I make no attempt to try
to make the
>installation of MSDE seamless or not require a reboot,
as most times a
>reboot is required before SQL Server will run. For
Windows 9x systems I then
>install a small executable that runs at boot time and
that will start up SQL
>Server (there are no services in Win9x), rather than
trying to configure
>something in the Startup folder.
>Stage 2 - In my next Wise script I look for my named
instance of MSDE. I've
>written a helper DLL that uses SQL-DMO and T-SQL to
provide a number of
>needed functions for doing preliminary database
configuration such as
>searching for runnning instances of SQL Server,
attaching the database,
>creating logins and such. If I find my instance then I
connect to it using
>the sa account, copy the database from the installation
source to the data
>directory of MSDE and attach it. I then create the
needed logins for the
>application. This current application uses ODBC (the
next version will use
>ADO) so I then create an system ODBC connection for the
application. To do
>this I run the user through the ODBC wizard (Wise can
fire this off for you)
>so that the user can determine that the connection is
valid and works.
>Stage 3 - Install the client application. This is a just
a straight forward
>application installation.
>Our product is installed on hundred of systems and the
installation process[vbcol=seagreen]
>has a very low failure or problem rate.
>Jim
>"George" <greda@.msn.com> wrote in message
>news:1912001c44ca9$e6dc0760$a301280a@.phx.gbl...
application
>
>.
>
Wednesday, March 7, 2012
deploying App to 2003 server with SQL2005
I devloped this app with vs2005 and SQL 2005 express, everything seems to work fine, when I deploied the app to my web server I got a few different error messages that I worked through but now stuck on this one. i am sure it is something with SQL 2005 server. is there anywhere that has a good check list for doing things right in asp and SQL deployment?
here is the error message i am getting from debugging.
The SELECT permission was denied on the object 'Categories', database 'Blog', schema 'dbo'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: The SELECT permission was denied on the object 'Categories', database 'Blog', schema 'dbo'.
Source Error:
Line 33: SqlConnection connection = CreateConnection();
Line 34: SqlCommand command = CreateCommand(connection, query, parameters);
Line 35: SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
Line 36:
Line 37: Type datatype = factory.GetDataType();
Source File: c:\Inetpub\blogplankroad\App_Code\Utilities\SqlDatabase.cs Line: 35
Hi Planker,
Just as the exception message describes, the user account you're using to connect to the database does not have permission to perform a SELECT on the certain table.
In the SQL Server Management Studio, please open the user property window and grant the proper permission for the user.
HTH. If this does not answer you question, please feel free to mark it as Not Answered and post your reply. Thanks!
deploying a report to a site hosted by 3rd party
I have been trying to deploy a web app that uses sql reports. I have copied the 3 dlls that are talked about.
Microsoft.ReportViewer.Common.dll
Microsoft.ReportViewer.WebForms.dll
Microsoft.ReportViewer.ProcessingObjectModel.dll
When I do this I get the following error:
Server Error in '/' Application.
Required permissions cannot be acquired.
Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details:System.Security.Policy.PolicyException: Required permissions cannot be acquired.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.Stack Trace:
[PolicyException: Required permissions cannot be acquired.] System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission) +2737813 System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Int32& securitySpecialFlags, Boolean checkExecutionPermission) +57[FileLoadException: Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)] System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0 System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +211 System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +141 System.Reflection.Assembly.Load(String assemblyString) +25 System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +32[ConfigurationErrorsException: Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)] System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +596 System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +3479097 System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +46 System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +177 System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir) +267 System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +36 System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory vdir, VirtualPath virtualDir, Boolean ignoreErrors) +429 System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +73 System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +580 System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +93 System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +111 System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +54 System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +31 System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +40 System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +139 System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +120 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
why does this not work?
Thanks,
enak
I would venture that you need to register the dll's in the gac. I'm rolling out an app to a custom webserver and had similiar problems. I need an ide on the machine so I install visual web developer and the reporting services add in and took care of my problem. The install would have taken care of the proper registering.Sunday, February 19, 2012
Deploy db to client with users?
over
users with the db, and how to I get MachineName\ASPNET as a user in that
install?
TIA
__Stephen
See if this helps:
HOW TO: Move Databases Between Computers That Are Running SQL Server
http://support.microsoft.com/default...b;en-us;314546
AMB
"Stephen Russell" wrote:
> I have a db with test data, and a .NET app for it's use. How do I pass
> over
> users with the db, and how to I get MachineName\ASPNET as a user in that
> install?
> TIA
> __Stephen
>
>
Deploy db to client with users?
over
users with the db, and how to I get MachineName\ASPNET as a user in that
install?
TIA
__StephenSee if this helps:
HOW TO: Move Databases Between Computers That Are Running SQL Server
http://support.microsoft.com/defaul...kb;en-us;314546
AMB
"Stephen Russell" wrote:
> I have a db with test data, and a .NET app for it's use. How do I pass
> over
> users with the db, and how to I get MachineName\ASPNET as a user in that
> install?
> TIA
> __Stephen
>
>
Deploy db to client with users?
over
users with the db, and how to I get MachineName\ASPNET as a user in that
install?
TIA
__StephenSee if this helps:
HOW TO: Move Databases Between Computers That Are Running SQL Server
http://support.microsoft.com/default.aspx?scid=kb;en-us;314546
AMB
"Stephen Russell" wrote:
> I have a db with test data, and a .NET app for it's use. How do I pass
> over
> users with the db, and how to I get MachineName\ASPNET as a user in that
> install?
> TIA
> __Stephen
>
>
Deploy C# Express app with SQL Server express DB
Hello Everyone,
I have developed an application in Visual C# Express Edition, that uses a SQL Server Express database. I am deploying it using ClickOnce, and I'm wondering if there are any settings I have to change to SQL Server express, in order for my application to be able to access the database, since I'm getting an error when I start the application. I consider myself a beginner developer, so please take that in mind, I'm looking for the easiest way to do this.
Any help will be highly appreciated,
Andrs
Is SQL Server Express installed as a prerequisite within the ClickOnce deployment or will a SQL Server be accessed which is not on the current client ?Jens K. Suessmeyer.
http://www.sqlserver2005.de