I have a website that writes and reads data from a database.It will help me to read and write to the same database from a separate website.Do I have a problem with "collisions" or are the calls to the database completely separate ?
In dotnetnuke, I have two sites located on different location. Now I want to point these two sites to the same database. Is it possible to point to same database.
I even tried pointing it from web.config, but thats not working. I don't want to work with child portals, because i have already created site on other location and all the source codes are under that, but when I create child Portal, it creates new portalnumber folder under portals, and it just has two folders in it, Users and Cache, I dont understand how to place codes, as DNN creates lots of folders while creating new site, which are missing here.
I am interested in developing Web Parts that can be used in our ASP.NET sites and our SharePoint sites. An example Web Part I have in mind is a Post Code (Zip Code) look up.- Visual Studio 2010 Premium- SharePoint Designer 2007- Windows 2003 Server (therefore WSS 3.0)- No SharePoint Server
I am currently learning JQuery by reading ebooks. I don't think by reading ebooks is good enough. So can I build a shopping cart website using both JQuery and ASP.NET 4.0 ? I plan to use ASP.NET 4.0 only for accessing the database only.
I have a ASP.NET MVC application which is build up as an assembly that queries the database and a asp.net frontend that references this assembly and this assembly abstracts the underlying database. This means that my Assembly contains a app.config file that contains the connectionstring to the database (Linq to Sql data model). How do I go about making this more flexible? Should i make a "initialize()" method somewhere in my assembly which takes the connection string from the asp.net mvc application and then that controls which database to use? or how is this done?
This is related to a previous question I asked, regarding splitting a asp.net mvc web application into two apps - one public, and one admin. Both of them would be sharing the same database of course.
With two web apps I'll have two host applications and so two seperate Nihbernate session factories. My concern is that their seperate data caches will cause all sorts of problems.
While posting this, I looked at this question, which covers a similar problem (for a different reason). I really don't want to have to set up some kind of distributed cache just for a low use admin application.
How can this be resolved? Is separating the admin section into it's own application not possible with NHibernate without drastic measures?
I have a web app that is trying to open a SQL Server Database and it's not working. The error that I am receiving is below:
"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections."
What needs to be done regarding the highlighted line in the error message?
I know this is a beginner question but I am struggling to find any clear tutorials etc on how I can create new records in a database table based on information added into text boxes on a page. Also what is the best way to do this LINQ, dynamic data website etc etc?
I am working on a website where when the user logs in, I select their database based on their username. Currently I have a list of all databases in the web.config and I select the Database ID from the username and then read the database string from web.config. What is the most optimal way to implement this scenario?
- store the Database ID in the session object
- the Session object expires after like 5 minutes so i have to read the Database ID from the online database based on the username and regenerate the Session["DatabaseID"] again.
- there are some security issues with the Session ID, so I started clearing the Session in !(Page.IsPostBack) and I generate the Database string again.
Where shall I store the DatabaseID and the database connection string so I can easily reuse it once the user has logged in?
To give some background details, I have created a website for a friend that has a few pages that require a database in the background. I've used Visual Studio templates for most of it, so there's the standard ASPNETDB.MDF file that's created for users and groups, a login page and a page to view and manage those users etc etc. The login page uses the standard controls for logging in, retrieving lost passwords and so on. Being standard controls, by default they get the connection string from the web.config file. Upon attempting to upload the site to my host (1and1.co.uk in case anyone else has any dealings with them) I discovered that storing the connectionstring doesn't work. 1and1 support say that the sql databases can only be accessed using scripts like this (this is an example of theirs):
<html> <title>Queries from the MS-SQL database with ASP</title> <body bgcolor="FFFFFF"> <h2>Query from table <b>products</b> with ASP</h2> <% Set conn = Server.CreateObject("ADODB.Connection") conn.open "PROVIDER=SQLOLEDB;DATA SOURCE=mssqxxx.1and1.com;UID=dboxxxxxxxxx;PWD=xxxxxxxx;DATABASE=dbxxxxxxxxx" 'This code block will create a recordset Set rs = Server.CreateObject("ADODB.Recordset") SQL = "select * from products" rs.open SQL, conn 'will iterate to display the records got from the database While Not rs.EOF response.write(rs("id") & " " & rs("price")) rs.MoveNext Wend 'closes the connection rs.close conn.close Set rs = Nothing Set conn = Nothing %> </body> </html>
So my question, is it possible to get the standard asp.net controls to access a database through a script like this?
I need to do an insert into a database table (SQL Server). I want to compute value of 1 column based on the existing data and then do an insert. How do I prevent another user from getting access to the database in the middle of this process?
I wish to acces my database using MSSMS at the same time that I am running my web application. When I tried to access my database with MSSMS I get the following error:Failed to retrieve data for this request (Microsoft.SqlServer. Management.SDk.Sfc)Additional Information:Unable to open the physical file "C:inetpubwwwrootmyappApp_Dataaspnetdb.mdf".Operationg system error 32: "32(The process cannot access the file because it is being used by another process)". (Microsoft SQL Server, Error:5120).What can I do to being able to view my database with MSSMS at the same time?
I am attempting to write my very first ASP.NET application, it will simply display the contents of an SQL server database table in a Gridview. This is just a first step, my eventual intention is rewrite a set of VB6 applications I wrote some years ago. But I need to walk before I can run.
I have already created an SQL Server database containing all the tables used by the VB6 applications.
How do I link this database to my ASP.NET application. Previously (on another computer) I have simply opened "My Computer" and then navigated to the .mdf file (e.g. northwnd.mdf) and then dragged and dropped it into App_Data in Visual Studio. However when I try that on my own machine, with my own data, I get an "Access Denied" message.
How can I not have access to my own data on my own computer? What am doing wrong?
I am running Visual Studio 2008 on a Windows 7 Ultimate machine, with SQL Server 2005 Compact Edition (or which ever one installs with VS 2008).
I am developing web application using asp.net. Here i need to access two databases in which one is present on other server. I am able to connect to database present in same server but not with database present in other server.
I am using MS-access. I dont know the changes to be done and syntax for database connection.
I'm currectly tryin to access a specific value in my database in a specific column. I'm tryin to use the primary key of the table to access the actual value in the row of that ID.
The current code:
Just iterates through the table and looking for any row with the boolean 'checkin' value is True, then it takes the 'id' value of that row and stores it into an array. Is there a way that I can access a another entry, and only that entry, in the table with the 'id' stored in the array?
Like if my data base contained and int, primarykey, `id` value, a boolean, `checkedin` value, and a `time` value, is there a way to access, lets say, the row with `id` equalling 3 and and the checkIn value from that row?
Okay, I have developed VB.NET winforms applications and I understand that working with ASP.NET would be similar. However, this seems way complicated then I thought. Basically, i am working on accessing one table data from a database and populating data in a datagrid. I have few text boxes on the display page and if a user clicks on submit button i want a new set of data with new select statement based on user input.
I don't quite understand how the textbox value can be passed on the same page and a new select statement is generated, which then populates the datagrid.
I built an ASP.NET 4.0 Web Site. It works perfectly on my development computer. However, when I deploy the web site to theProduction Server, which is a Win2003 Small Business with Sql Server 2000, the site can't connect to the database.
These are the different tests I've made:
I tried using Integrated Windows authentication and this connection string: Data Source=myServerAddress;Initial Catalog=myDataBase;Integratedsecurity=true; and the error I got was that NT Authority/Network Service couldn't open the database. So I added that account to my database users list and gave it the appropiate permissions. Nothing.I tried using Sql Server authentication, so I created a new database user with a password and changed my connection string toData Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;. Nothing. I still got the same NT Authority user message.I deleted the used I created in step 2 and used the same connection string, to see if this time I got an error saying something about my user, and indeed it happened. I got an exception saying that user myUsername couldn't log on. I then created the user again, ang got the NT Authority user message one more time.I created a console application that used the same connection string from steps 2 and 3, and it connected to the database witouth any problem, which made me think that my problem's got something to do with my Web.config.I tried enabling impersonation on my Web.config, and thos time I got the same error message, only referring to the user I logged in to Windows, instead of NT Authority/Network service. What else could I check? My Web.config is this in case it helps (I havn't really put anything into it other than what VS puts):
I want to create several websites on my domain, and I am wondering how to go about this in MVC? Should I put them all within one project, and create separate folders in each Views, Models and Controllers folder for each site, or would it be better to create a separate project for each site, although I'm not sure how I would integrate