locked
I may be missing something RRS feed

  • Question

  • User-731798708 posted

    This is m first asp site and i am having trouble getting it working on line! I have tweaked the template to fit the club and tested in visual web developer and it works fine, but not over the net?? any ideas, please look at error page i am getting if needed,

     

    www.evassociates.co.uk

     

    Jay

    Tuesday, May 1, 2007 6:36 AM

All replies

  • User1483970546 posted

    Hi Jay,

    I have seen your website, and its seems like that you have not checked the 'Allow Remoting Connection' option on your database Sever, To enable this options Open the SQL Server Management Studio, Right Click on the Server Node, got to the properties, then go to the Connection options in Left Pane, and check the 'Allow Remoting Connection On This Server' option,

    Also make sure that your Connection String is correct.

    Thank You

    Regards,

    Muhammad Akhtar Shiekh

    Tuesday, May 1, 2007 7:03 AM
  • User-731798708 posted

    My site is hosted through fast hosts, I do not have access to the server?

     Any ideas?

    Tuesday, May 1, 2007 10:44 AM
  • User-80939892 posted

    Is your database located on a hosted ‘MS SQL Server 2005’ instance. For example…Your code may reside on a web server and the database on a sql server (two different boxes).<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>

    <o:p> </o:p>

    A.  If you are attempting to use your sql express database in your websites ~data directory (local db connection) then you may have some issues…<o:p></o:p>

     <o:p></o:p>

    1. ‘SQL Server Express’ must be installed on the IIS box. Depending on directory security IIS may not allow local access (Windows authentication is not the best way to go in hosted environments.) Most likely you will not be able to control this in a shared hosted environment.<o:p></o:p>
    2. For remote SQL Server access the setting ‘Allow remote connections to this server’ must be turned on. (From ‘SQL Server Management Studieo Express’ right click on the server node, select ‘Server Properties’ then the ‘Connections’ page) You will most likely not be able to modify the server properties is a hosted/shared SQL server environment.<o:p></o:p>

     <o:p></o:p>

    B. The best way to go is to use a host that also provides MS SQL Server 2005 with your service. You will first create the empty database then add the security and application tables. This will use SQL Server authentication so you will need to modify your database connection setting in the web.config file (just comment out the local db setting then add the remote setting... see example below). <o:p></o:p>

    <o:p> </o:p>

    1. Buy the domain name and hosting service... (ASP.NET 2.0+ with <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:City w:st="on"><st1:place w:st="on">AJAX</st1:place></st1:City> Ver: 1.0+ and MS SQL Server 2005)<o:p></o:p>
    2. Create a blank database. <o:p></o:p>
    3. Determine that you can connect to the database remotely using Server Management Studio (the management studio is a free download from Microsoft). <o:p></o:p>
    4. Use the .Net Framework Tool “aspnet_regsql.exe” ( in your Folder:  C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727) pointed to your remote database to create the .net security tables. <o:p></o:p>
    5. Using Server Management Studio pointed to your remote database. Select “New Query” then paste the Remote (dbo table space) Database Creation and Update scripts into the query editor window and execute the queries to create all application tables. <o:p></o:p>
    6. Edit web.config <connectionStrings> to point to the remote database. <o:p></o:p>
    7. Use vs2005 ASP.NET configuration tool to create at least one administrators role and user. <o:p></o:p>
    8. Use vs2005 to run your application in debug mode pointed to the remote database. Everything should work ok. <o:p> </o:p>

    <!-- Sample Remote Test database   --><o:p></o:p>

    <add name="CurrentSiteDB" connectionString="Data Source=Your Remote Database Server Address (do not include the http://www. part.) ; Initial Catalog=Your Remote Database Name ;Persist Security Info=True; UID=Your Remote Database User Id;PWD=Your Remote Database Password" providerName="System.Data.SqlClient"/><o:p></o:p>

    <o:p> </o:p>

    Remote Database Creation Example (same as existing creation script except notice the dbo. table space has been added) <o:p></o:p>

    -----------------------------------------------------------------------------------------------------------------<o:p></o:p>

    --  ADD Announcements Table<o:p></o:p>

    -----------------------------------------------------------------------------------------------------------------<o:p></o:p>

    <o:p> </o:p>

    CREATE TABLE dbo.Announcements (<o:p></o:p>

                [id] [int] IDENTITY (1, 1) NOT NULL ,<o:p></o:p>

                [itemdate] [datetime] NOT NULL ,<o:p></o:p>

                [title] [varchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,<o:p></o:p>

                [description] [varchar] (5000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,<o:p></o:p>

                [staticURL] [varchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,<o:p></o:p>

                [photo] [int] NOT NULL ,<o:p></o:p>

                [albumid] [int] NULL <o:p></o:p>

    ) ON [PRIMARY]<o:p></o:p>

    GO<o:p></o:p>

    <o:p> </o:p>

    ALTER TABLE Announcements ADD CONSTRAINT [PK_Announcements] PRIMARY KEY  CLUSTERED ([id])  ON [PRIMARY] <o:p></o:p>

    GO<o:p></o:p>

    <o:p> </o:p>

    CREATE PROCEDURE dbo.NextAnnouncement (@id int)<o:p></o:p>

    AS<o:p></o:p>

                /* SET NOCOUNT ON */ <o:p></o:p>

                <o:p></o:p>

                DECLARE @curr datetime<o:p></o:p>

                <o:p></o:p>

                SELECT @curr = itemdate<o:p></o:p>

                FROM Announcements<o:p></o:p>

                WHERE (id = @id)<o:p></o:p>

    <o:p> </o:p>

    <o:p> </o:p>

    SELECT              top 1 nextid= id<o:p></o:p>

                FROM   Announcements<o:p></o:p>

                WHERE            (itemdate > @curr OR<o:p></o:p>

                                        (itemdate = @curr) AND (id > @id)) order by itemdate asc, id  asc<o:p></o:p>

    GO<o:p></o:p>

    <o:p> </o:p>

    CREATE PROCEDURE dbo.NextPrevAnnouncement (@id int, @previd int output, @nextid int output)<o:p></o:p>

    AS<o:p></o:p>

                /* SET NOCOUNT ON */ <o:p></o:p>

                <o:p></o:p>

                DECLARE @curr datetime<o:p></o:p>

                <o:p></o:p>

                SELECT @curr = itemdate<o:p></o:p>

                FROM Announcements<o:p></o:p>

                WHERE (id = @id)<o:p></o:p>

    <o:p> </o:p>

                SELECT            @previd=  id<o:p></o:p>

                FROM   Announcements<o:p></o:p>

                WHERE            (itemdate < @curr OR<o:p></o:p>

                                        (itemdate = @curr) AND (id < @id)) order by itemdate asc, id asc<o:p></o:p>

    <o:p> </o:p>

    <o:p> </o:p>

    SELECT            @nextid= id<o:p></o:p>

                FROM   Announcements<o:p></o:p>

                WHERE            (itemdate > @curr OR<o:p></o:p>

                                        (itemdate = @curr) AND (id > @id)) order by itemdate desc, id  desc<o:p></o:p>

    GO<o:p></o:p>

    Tuesday, May 1, 2007 1:59 PM