|
|
Three of the six questions here (including and as of this post) are about the sample not working in IE. One of the questions has not been answered since the end of May. A question answered April 24, 2011 seemed to have received an answer, but for some reason the answer wasn’t posted here and the stockoverflow link no longer exists (which is why it should have also been copied to here). Given this is the first sample I’ve tried using, I’m not impressed nor happy. I could see this if this were a VS 2008 sample, but this is supposed to be a VS 2010 sample.
I was successfully able to execute the code when using chrome or firefox, but it does not work when using IE9. I tried to use the latest version of jquery and still it did not work. Please advise.
Hi
I attached the .mdf file directly to SQL server 2008 Enterprise Edition , as you described I will change the web.config accordingly. I got all four tables in the database correctly in SQL Server .
Now
"Step 4. Create a new directory, "Data". Right-click the directory and click
Add -> New Item -> Linq to SQL classes.(If you could not find that
template, please click the Data node of the tree view at the left
hand.) In this sample, it is SessionDB.dbml. "
This I did
what to do with the next step:
"Step 5. Open the SessionDB.dbml and double-click the SessionDB.mdf, you will
see the database in the Server Explorer. Expand the SessionDB.mdf,
expand the Tables folder, and select the four tables, and drag them
all to the stage of the SessionDB.dbml. "
How should I move forward with the codind and building the application
Regards
Shijila
Use Server Explorer to create a connection to your SQL Server 2008, this is the same way as "double-click the SessionDB.mdf". http://msdn.microsoft.com/en-u s/library/33wwc 2yw(VS.80).aspx
I would like to create the whole thing in VS 2008 for , what are the changes need to be made
Try to follow the ReadMe to create this sample by Visual Studio 2008, the result will be same. If you get any problem when you reproduce the sample, please post your question here, you will get answers.
Hi When I try to do this: "Right-click the App_Data directory, and click Add -> New Item -> SQL Server DataBase. In this sample it is "SessionDB.mdf"." I get the following error "Connections to SQL Server files (*.mdf) require SQL Server 2005 Express to function properly.Please verify th einstallation of the component or download from the link [link is privided]" I have installed * Visual Studio 2008 and * SQL Server 2008 EnterPrise Edition in my system What is the steps to correct the scenario
The mdf files are database file of Express version, so the VS need the SQL Express installed into your machine. Of course, we can configure the database to the SQL Server 2008. After you create the tables, you can change the connectionString,SessionDBConn ectionString to yours like this in your web.config. <add name="SessionDB ConnectionStrin g" connectionStrin g="Data Source=.;Initia l Catalog=YourDat abase;Integrate d Security=True;U ser Instance=True" providerName="S ystem.Data.SqlC lient" /> Please use this script to generate the table schemas for SQL Server 2008:
--USE YourDatabase --GO /****** Object: ForeignKey [FK_tblMessagePool_tblTalker] Script Date: 05/03/2011 09:26:28 ******/ IF EXISTS (SELECT * FROM sys.foreign_key s WHERE object_id = OBJECT_ID(N'[db o].[FK_tblMessa gePool_tblTalke r]') AND parent_object_i d = OBJECT_ID(N'[db o].[tblMessageP ool]')) ALTER TABLE [dbo].[tblMessa gePool] DROP CONSTRAINT [FK_tblMessageP ool_tblTalker] GO /****** Object: ForeignKey [FK_tblTalker_t blChatRoom] Script Date: 05/03/2011 09:26:28 ******/ IF EXISTS (SELECT * FROM sys.foreign_key s WHERE object_id = OBJECT_ID(N'[db o].[FK_tblTalke r_tblChatRoom]' ) AND parent_object_i d = OBJECT_ID(N'[db o].[tblTalker]' )) ALTER TABLE [dbo].[tblTalke r] DROP CONSTRAINT [FK_tblTalker_t blChatRoom] GO /****** Object: ForeignKey [FK_tblTalker_t blSession] Script Date: 05/03/2011 09:26:28 ******/ IF EXISTS (SELECT * FROM sys.foreign_key s WHERE object_id = OBJECT_ID(N'[db o].[FK_tblTalke r_tblSession]') AND parent_object_i d = OBJECT_ID(N'[db o].[tblTalker]' )) ALTER TABLE [dbo].[tblTalke r] DROP CONSTRAINT [FK_tblTalker_t blSession] GO /****** Object: Table [dbo].[tblMessa gePool] Script Date: 05/03/2011 09:26:28 ******/ IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[db o].[tblMessageP ool]') AND type in (N'U')) DROP TABLE [dbo].[tblMessa gePool] GO
/****** Object: Table [dbo].[tblTalker] Script Date: 05/03/2011 09:26:28 ******/ IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[db o].[tblTalker]' ) AND type in (N'U')) DROP TABLE [dbo].[tblTalke r] GO /****** Object: Table [dbo].[tblChatR oom] Script Date: 05/03/2011 09:26:28 ******/ IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[db o].[tblChatRoom ]') AND type in (N'U')) DROP TABLE [dbo].[tblChatR oom] GO /****** Object: Table [dbo].[tblSessi on] Script Date: 05/03/2011 09:26:28 ******/ IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[db o].[tblSession] ') AND type in (N'U')) DROP TABLE [dbo].[tblSessi on] GO /****** Object: Default [DF_tblChatRoom _NeedPassword] Script Date: 05/03/2011 09:26:28 ******/ IF EXISTS (SELECT * FROM sys.default_con straints WHERE object_id = OBJECT_ID(N'[db o].[DF_tblChatR oom_NeedPasswor d]') AND parent_object_i d = OBJECT_ID(N'[db o].[tblChatRoom ]')) Begin IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF _tblChatRoom_Ne edPassword]') AND type = 'D') BEGIN ALTER TABLE [dbo].[tblChatR oom] DROP CONSTRAINT [DF_tblChatRoom _NeedPassword] END End GO /****** Object: Default [DF_tblChatRoom _MaxUserNumber] Script Date: 05/03/2011 09:26:28 ******/ IF EXISTS (SELECT * FROM sys.default_con straints WHERE object_id = OBJECT_ID(N'[db o].[DF_tblChatR oom_MaxUserNumb er]') AND parent_object_i d = OBJECT_ID(N'[db o].[tblChatRoom ]')) Begin IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF _tblChatRoom_Ma xUserNumber]') AND type = 'D') BEGIN ALTER TABLE [dbo].[tblChatR oom] DROP CONSTRAINT [DF_tblChatRoom _MaxUserNumber] END End GO
/****** Object: Default [DF_tblChatRoom_IsLock] Script Date: 05/03/2011 09:26:28 ******/ IF EXISTS (SELECT * FROM sys.default_con straints WHERE object_id = OBJECT_ID(N'[db o].[DF_tblChatR oom_IsLock]') AND parent_object_i d = OBJECT_ID(N'[db o].[tblChatRoom ]')) Begin IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF _tblChatRoom_Is Lock]') AND type = 'D') BEGIN ALTER TABLE [dbo].[tblChatR oom] DROP CONSTRAINT [DF_tblChatRoom _IsLock] END End GO /****** Object: Table [dbo].[tblSessi on] Script Date: 05/03/2011 09:26:28 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFI ER ON GO IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[db o].[tblSession] ') AND type in (N'U')) BEGIN CREATE TABLE [dbo].[tblSessi on]( [UID] [int] IDENTITY(1,1) NOT NULL, [SessionID] [nvarchar](50) COLLATE Chinese_PRC_CI_ AS NOT NULL, [IP] [nvarchar](50) COLLATE Chinese_PRC_CI_ AS NOT NULL, [UserAlias] [nvarchar](50) COLLATE Chinese_PRC_CI_ AS NOT NULL, CONSTRAINT [PK_tblSession] PRIMARY KEY CLUSTERED ( [UID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORE COMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCK S = ON) ) END GO IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[db o].[tblSession] ') AND name = N'IX_tblSession ') CREATE UNIQUE NONCLUSTERED INDEX [IX_tblSession] ON [dbo].[tblSessi on] ( [SessionID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORE COMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCK S = ON) GO
/****** Object: Table [dbo].[tblChatRoom] Script Date: 05/03/2011 09:26:28 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFI ER ON GO IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[db o].[tblChatRoom ]') AND type in (N'U')) BEGIN CREATE TABLE [dbo].[tblChatR oom]( [ChatRoomID] [uniqueidentifi er] NOT NULL, [ChatRoomPasswo rd] [nvarchar](50) COLLATE Chinese_PRC_CI_ AS NOT NULL, [ChatRoomName] [nvarchar](50) COLLATE Chinese_PRC_CI_ AS NOT NULL, [NeedPassword] [bit] NOT NULL, [MaxUserNumber] [int] NOT NULL, [IsLock] [bit] NOT NULL, CONSTRAINT [PK_tblChatRoom ] PRIMARY KEY CLUSTERED ( [ChatRoomID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORE COMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCK S = ON) ) END GO /****** Object: Table [dbo].[tblTalke r] Script Date: 05/03/2011 09:26:28 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFI ER ON GO IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[db o].[tblTalker]' ) AND type in (N'U')) BEGIN CREATE TABLE [dbo].[tblTalke r]( [TalkerID] [int] IDENTITY(1,1) NOT NULL, [SessionID] [int] NOT NULL, [ChatRoomID] [uniqueidentifi er] NOT NULL, [CheckInTime] [datetime] NOT NULL, [CheckOutTime] [datetime] NULL, CONSTRAINT [PK_tblTalker] PRIMARY KEY CLUSTERED ( [TalkerID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORE COMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCK S = ON) ) END GO
/****** Object: Table [dbo].[tblMessagePool] Script Date: 05/03/2011 09:26:28 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFI ER ON GO IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[db o].[tblMessageP ool]') AND type in (N'U')) BEGIN CREATE TABLE [dbo].[tblMessa gePool]( [messageID] [int] IDENTITY(1,1) NOT NULL, [message] [nvarchar](1000 ) COLLATE Chinese_PRC_CI_ AS NOT NULL, [SendTime] [datetime] NOT NULL, [talkerID] [int] NOT NULL, CONSTRAINT [PK_tblMessageP ool] PRIMARY KEY CLUSTERED ( [messageID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORE COMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCK S = ON) ) END GO /****** Object: Default [DF_tblChatRoom _NeedPassword] Script Date: 05/03/2011 09:26:28 ******/ IF Not EXISTS (SELECT * FROM sys.default_con straints WHERE object_id = OBJECT_ID(N'[db o].[DF_tblChatR oom_NeedPasswor d]') AND parent_object_i d = OBJECT_ID(N'[db o].[tblChatRoom ]')) Begin IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF _tblChatRoom_Ne edPassword]') AND type = 'D') BEGIN ALTER TABLE [dbo].[tblChatR oom] ADD CONSTRAINT [DF_tblChatRoom _NeedPassword] DEFAULT ((0)) FOR [NeedPassword] END End GO /****** Object: Default [DF_tblChatRoom _MaxUserNumber] Script Date: 05/03/2011 09:26:28 ******/ IF Not EXISTS (SELECT * FROM sys.default_con straints WHERE object_id = OBJECT_ID(N'[db o].[DF_tblChatR oom_MaxUserNumb er]') AND parent_object_i d = OBJECT_ID(N'[db o].[tblChatRoom ]')) Begin IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF _tblChatRoom_Ma xUserNumber]') AND type = 'D') BEGIN ALTER TABLE [dbo].[tblChatR oom] ADD CONSTRAINT [DF_tblChatRoom _MaxUserNumber] DEFAULT ((3)) FOR [MaxUserNumber] END End GO
/****** Object: Default [DF_tblChatRoom_IsLock] Script Date: 05/03/2011 09:26:28 ******/ IF Not EXISTS (SELECT * FROM sys.default_con straints WHERE object_id = OBJECT_ID(N'[db o].[DF_tblChatR oom_IsLock]') AND parent_object_i d = OBJECT_ID(N'[db o].[tblChatRoom ]')) Begin IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF _tblChatRoom_Is Lock]') AND type = 'D') BEGIN ALTER TABLE [dbo].[tblChatR oom] ADD CONSTRAINT [DF_tblChatRoom _IsLock] DEFAULT ((0)) FOR [IsLock] END End GO /****** Object: ForeignKey [FK_tblMessageP ool_tblTalker] Script Date: 05/03/2011 09:26:28 ******/ IF NOT EXISTS (SELECT * FROM sys.foreign_key s WHERE object_id = OBJECT_ID(N'[db o].[FK_tblMessa gePool_tblTalke r]') AND parent_object_i d = OBJECT_ID(N'[db o].[tblMessageP ool]')) ALTER TABLE [dbo].[tblMessa gePool] WITH CHECK ADD CONSTRAINT [FK_tblMessageP ool_tblTalker] FOREIGN KEY([talkerID]) REFERENCES [dbo].[tblTalke r] ([TalkerID]) GO IF EXISTS (SELECT * FROM sys.foreign_key s WHERE object_id = OBJECT_ID(N'[db o].[FK_tblMessa gePool_tblTalke r]') AND parent_object_i d = OBJECT_ID(N'[db o].[tblMessageP ool]')) ALTER TABLE [dbo].[tblMessa gePool] CHECK CONSTRAINT [FK_tblMessageP ool_tblTalker] GO /****** Object: ForeignKey [FK_tblTalker_t blChatRoom] Script Date: 05/03/2011 09:26:28 ******/ IF NOT EXISTS (SELECT * FROM sys.foreign_key s WHERE object_id = OBJECT_ID(N'[db o].[FK_tblTalke r_tblChatRoom]' ) AND parent_object_i d = OBJECT_ID(N'[db o].[tblTalker]' )) ALTER TABLE [dbo].[tblTalke r] WITH CHECK ADD CONSTRAINT [FK_tblTalker_t blChatRoom] FOREIGN KEY([ChatRoomID ]) REFERENCES [dbo].[tblChatR oom] ([ChatRoomID]) GO IF EXISTS (SELECT * FROM sys.foreign_key s WHERE object_id = OBJECT_ID(N'[db o].[FK_tblTalke r_tblChatRoom]' ) AND parent_object_i d = OBJECT_ID(N'[db o].[tblTalker]' )) ALTER TABLE [dbo].[tblTalke r] CHECK CONSTRAINT [FK_tblTalker_t blChatRoom] GO
/****** Object: ForeignKey [FK_tblTalker_tblSession] Script Date: 05/03/2011 09:26:28 ******/ IF NOT EXISTS (SELECT * FROM sys.foreign_key s WHERE object_id = OBJECT_ID(N'[db o].[FK_tblTalke r_tblSession]') AND parent_object_i d = OBJECT_ID(N'[db o].[tblTalker]' )) ALTER TABLE [dbo].[tblTalke r] WITH CHECK ADD CONSTRAINT [FK_tblTalker_t blSession] FOREIGN KEY([SessionID] ) REFERENCES [dbo].[tblSessi on] ([UID]) GO IF EXISTS (SELECT * FROM sys.foreign_key s WHERE object_id = OBJECT_ID(N'[db o].[FK_tblTalke r_tblSession]') AND parent_object_i d = OBJECT_ID(N'[db o].[tblTalker]' )) ALTER TABLE [dbo].[tblTalke r] CHECK CONSTRAINT [FK_tblTalker_t blSession] GO
You can also download it from my live space: http://gpk2bg.blu.livefilestor e.com/y1pWDBpXX gMYBrXuLHXrvwk9 5U2gg-MPZpiluZk _GRnyQVMxaVz83b XkYMv1TqGK98m5G S6ISneAj4QicIDj _ofRRDaYwhQkQx9 /webchat.sql?do wnload&psid=1
I asked the following question on Stack Overflow relating to this sample: http://stackoverflow.com/quest ions/5735240/sc aling What are the correct IIS settings and .js callbacks that affect the execution of this code? -- Setting AsyncPostBackTi meout to a low value (5) does not cause the script to timeout or fail -- httpRuntime executionTimeou t="5"/ in web.config does not seem to have an effect What portions of the IIS infrastructure are stressed when this application scales? -- What is the maximum concurrent WaitOne threads? Please answer this question on StackOverflow so the largest possible community can see the answer: http://stackove rflow.com/quest ions/5735240/sc aling
Hello ChrisLaMont Our engineer has replied to you in the stackoverflow thread. Please check out his answer. Thank you and have a nice day! All-In-One Code Framework Team