Forum Moderators: open
Mac: "The file blah.aspx is of type application/octet-stream (Untyped Binary Data), and Netscape does not know how to handle this file type." Open save to disk etc.
PC: "You have chosen to download a file of type: application/octet-stream from..."
Is this a server configuration issue? It's hosted on a Win2K box. Opens fine on IE, Safari, Opera without any added fussing (Opera displays the file, but doesn't like the VB language header, spits it out as text at the top of the page when it's the second line).
Here's the doctype I'm using:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1" %>
Is .NET installed on Win2K?
Visual Studio will create a starter ASPX page for you with the @Page directive and a DOCTYPE and everything else that needs to be there.
But that's besides the point. I suspect that you simply either (1) don've have IIS and the .NET framework installed on the computer, or (2) they are installed, but you didn't put the ASPX file in a directory that's recognized by IIS as being a web directory.
If IIS and the .NET framework were set up right, you wouldn't get an error in Netscape if your page was bad, you'd get an ASP.NET error message.
If you are creating .ASPX files without the Visual Studio development environment, you are making it a lot harder.
But that's besides the point. I suspect that you simply either (1) don've have IIS and the .NET framework installed on the computer, or (2) they are installed, but you didn't put the ASPX file in a directory that's recognized by IIS as being a web directory.
I suspect it isn't installed. When the host turned the server over to me I asked "Is .NET installed?" and they replied "What's that?".
I asked "Is .NET installed?" and they replied "What's that?".
If you are creating .ASPX files without the Visual Studio development environment, you are making it a lot harder.
It's not only harder, it's not possible to take advantage of the .NET features unless you have the Visual Studio Dev Environment to Compile the Project DLL. Without the code behind modules running you're just creating ASP pages with a different extension. ASP pages will still run on a .NET server, ASPX pages are intended to utilize the Framework which can consist of classes and objects running beneath the HTML.
Definitely time for a new host.
I wouldn't recommend being their first .NET deployment unless your a patient person considering you are learning the language... Without the code behind modules running you're just creating ASP pages with a different extension.
This gives me a lot to think about. Like...
What is the basic difference between ASP and ASP.NET, or more practically, in what kind of scenario would someone want to choose one over the other?
Any particular advantages to .NET?
I will be doing more reading on this. Any good 1-2-3 reference recommendations off the top of your head(s)?
ASP is HTML with embedded VB Functions
.NET is a true object oriented programming language. .NET web applications consist of two main components: HTML/Presentation and the code behind. The best comparison is likened to a Visual Basic EXE where you have Forms for the user to navigate. These forms have methods (button_click, page_load, etc.) that call classes and modules to derive results to be passed to the GUI. This is the same approach to use in .NET web development.
An simple example:
Classic ASP
<HTML>
<BODY>
The name of my favorite color is: <%=GetColor%>
</BODY>
</HTML><%
Function GetColor
Return "Green"
End Function
%>
.NET
<HTML>
<BODY>
The name of my favorite color is: <asp:Label id=MyColor runat="server"></asp:Label>
</BODY>
</HTML>
Then in the Code Behind module (default.vb)
Private Sub Page_Load
Me.MyColor.Text = "Green"
End Sub
Hope this helps. This example is using VB.NET. You also have the choice of C# or even C++ as well. If it looks like ASP is a more straight-forward approach and easier to code, you are right but more complex systems and coding will give you greater flexibility when using .NET. You will develop several .NET applications before you decide what methods work best for you. Best advice is to sign up for a class and get a good overview before you start blindly and develop bad habits.
What is the basic difference between ASP and ASP.NET, or more practically, in what kind of scenario would someone want to choose one over the other?
There is NO reason to use old ASP. ASP.NET is light years ahead. Faster, more powerful, easier to use to develop complex applications.
ASP.NET is the greatest web development tool ever developed.
Mind you that I don't think that everything Microsoft does is great. MS also wants you to use .NET for non-internet desktop applications, and I think that VB6 was easier to use and better for that. There's a lot that I hate about .NET for client/server.
But ASP.NET is fabulous. SQL Server is fabulous too. ASP.NET + SQL Server is well worth the additional hosting costs.
The grid control that comes with .NET sucks, it's ridiculously overcomplicated (you have to have a PhD in object oriented programing just to figure out how to change the color of a row), yet it's missing basic features like being able to put a combobox in a grid cell.
The ADO stuff with Datasets and Datatables is ridiculously overcomplicated as well.
>> The ADO stuff with Datasets and Datatables is ridiculously overcomplicated as well
I disagree here. The new ADO model has so much to offer. I prefer to stay away from any of the drag/drop objects like the grids/connections/etc. and produce my own HTML and object declarations. The drag/drop stuff off the toolbar needs some work to be 100%. If your in the desktop apps instead of the web, you're kinda stuck with that complicated grid.
Here's a "what have you done with .NET"
Using the System.Xml.XmlReader and the SQLClient to load in XML produced by a FOR XML select in SQL Server. The XML is transformed via XSLT to produce HTML on the fly. It's fast. Scary fast. This gives me a single XSLT to control the look/feel/layout of every "category" page and another XSLT for the product detail pages. Change 1 file and affect 000's of pages. Pretty sweet.
.NET is a clone of JSP.
Where JSP is HTML + the entire Java Language capabilities, .NET is HTML + the entire C# (java) or VB or other language capabilities.
They function pretty much the same way.
Both compile your source code and present it to the end user as an HTML type page.
Which one is better? That's subjective.
What makes .NET special is the .NET framework and the ASP.NET object model and server controls. And its ease of deployment. And its wonderful designer, Visual Studio.
I started to look seriously into java recently and your right... I've been writing c# for a couple of years now and I couldn't believe how similar the languages were when I started looking at java.
Makes it easier to come up to speed; which is a nice side benefit that I got when I choose c# over vb.net. Had I gone down the vb.net route; java would be a much steeper climb.
Answer: User controls [dotnetjunkies.com].
That was painful. Using regular ASP #includes doesn't process code at the server.
It's still seeping into my coffee addled brain. The other thing, maybe helpful to others faced with a .NET project and have only PHP experience... use C#. It's way more like PHP. It uses ; at the end of lines, // for comments, but it is case sensitive so watch out there.
Now I'm exploring "web services" and what they can do. Anyone, and it's getting time to start a new thread, know if web services are private enough to use for a customer database?
Update: I installed .NET 1.1 with service pack 1 on a Win2K server and am a happy camper. Thanks to everyone.