.Net Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - More.Net Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 25th, 2004, 09:22 PM
Jebuz Jebuz is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: My own mind
Posts: 11 Jebuz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Jebuz Send a message via Yahoo to Jebuz
Unable to attach to ASP.NET process...?

Hi, I have the book "Programming in C#" and I am learning about ASP.NET right now. I am working on a webform example in the book and it says to install IIS and FP Server Extensions. I have installed IIS v5.1 and the front page server extensions, however when I run my code (typed verbatim from the book) it starts an Internet Explorer page with URL:http://localhost/WebForm1/HelloWeb.aspx and displays nothing then I get an error message box stating "Unable to attach to ASP.NET process (typically aspnet_wp.exe)"

I am a definite newbie with all of this and was wondering why I can't seem to get ASP.NET or webforms to work properly.

Here is the code I have in Borland C# Builder (Although a simple webform with hello world and a <% %> time statement also fails):
PHP Code:
 using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace WebForm1
{
    
/// <summary>
    /// Summary description for WebForm1.
    /// </summary>

    
public class WebForm1 System.Web.UI.Page
    
{
        
// Data members used for initializing page_load with
        // data from database.
        
private System.Data.SqlClient.SqlConnection myConnection;
        private 
System.Data.DataSet myDataSet;
        private 
System.Data.SqlClient.SqlCommand myCommand;
        private 
System.Data.SqlClient.SqlDataAdapter dataAdapter;

        protected 
System.Web.UI.WebControls.RadioButtonList rbl1;
        private 
void Page_Load(object senderSystem.EventArgs e)
        {
            
// Put user code to initialize the page here
            
if(!IsPostBack)
            {
                
string connectionString "server=(local)\\NetSDK;" +
                    
"Trusted_Connection=yes; database=northwind";
                
myConnection = new System.Data.SqlClient.SqlConnection(
                    
connectionString);
                
myConnection.Open();

                
// Create the dataset and set Case Sensitive Property
                
myDataSet = new System.Data.DataSet();
                
myDataSet.CaseSensitive true;

                
// Create the SqlCommand onject and assign the
                // connection and the select statement
                
myCommand = new System.Data.SqlClient.SqlCommand();
                
myCommand.Connection myConnection;
                
myCommand.CommandText "SELECT ShipperID, CompanyName FROM Shippers";

                
// create the dataAdapter object and pass in the
                // SqlCommand object and establish the data mappings
                
dataAdapter = new System.Data.SqlClient.SqlDataAdapter();
                
dataAdapter.SelectCommand=myCommand;
                
dataAdapter.TableMappings.Add("Table""Shippers");
                
dataAdapter.Fill(myDataSet);

                
// Set up the properties for the rbl1
                
rbl1.RepeatLayout =
                    
System.Web.UI.WebControls.RepeatLayout.Flow;
                
rbl1.DataTextField "CompanyName";
                
rbl1.DataValueField "ShipperID";

                
// Set the datasource and use default view of shippers table
                
rbl1.DataSource myDataSet.Tables["Shippers"].DefaultView;
                
rbl1.DataBind();

                
// Set one to be default selected
                
rbl1.Items[0].Selected true;
            }

        }

        
#region Web Form Designer generated code
        
override protected void OnInit(EventArgs e)
        {
            
//
            // CODEGEN: This call is required by the ASP.NET Web Form Designer.
            //
            
InitializeComponent();
            
base.OnInit(e);
        }
        
        
/// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        
private void InitializeComponent()
        {
            
this.Load += new System.EventHandler(this.Page_Load);
        }
        
#endregion
    


Reply With Quote
  #2  
Old January 26th, 2004, 02:41 PM
Jebuz Jebuz is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: My own mind
Posts: 11 Jebuz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Jebuz Send a message via Yahoo to Jebuz
I figured it out so disregard this question. After hours of searching online I found I had to run a program "aspnet_regiis -i" and then my asp stuff worked beautifully! Don't really know why or what the program I ran did or is, but hey it works now!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - More.Net Development > Unable to attach to ASP.NET process...?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT