473,480 Members | 1,536 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Port to Visual Studio

I have an ASP.NET application that I coded with a text editor and command
line compiler. I'm trying to port it to Visual Studio for the IDE tools and
debugger, but am having a lot of problem with code that works in my original
app and not in Visual Studio.

For example, my application has a component dll with some utility functions
in it. One of the functions is accessing the application configuration
which is a serializable object stored in a app.dat file on disk.

The routine to de-serialize the file and create the object looks like this:

Dim objFileStream As FileStream

Dim bFileOpen As Boolean

Dim objBinaryFormatter As BinaryFormatter

Try

objHttpContext = System.Web.HttpContext.Current

bFileOpen = False

objFileStream = New
FileStream(objHttpContext.Server.MapPath("/makeReady/Customers/mrConfig.dat"
), FileMode.Open)

objBinaryFormatter = New BinaryFormatter

objAppConfig = CType(objBinaryFormatter.Deserialize(objFileStream ),
AppConfig)

objHttpContext.Application("AppConfig") = objAppConfig

This works in my original app, but in Visual Studio the
'formatter.Deserialize' line throws an invalid cast exception.

Any suggestions?

Thanks.
Nov 19 '05 #1
0 900

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2055
by: Rudy Ko | last post by:
Dear All, I have Apache using port 80. So I changed IIS to use port 8000 as default web service. After that all my .net projects were not able to load into Visual Studio .net. Do you know how to...
0
2565
by: gerd | last post by:
Hello, I want to port an MFC Application from Visual Studio 6 MFC application to Visual C++ 2005 express edition beta. While building i get following error: ------ Build started: Project:...
0
774
by: gerd | last post by:
Hello, I want to port an MFC Application from Visual Studio 6 MFC application to Visual C++ 2005 express edition beta. While building i get following error: ------ Build started: Project:...
0
1208
by: amjad | last post by:
Dear All, I am using Visual Studio beta 2005 beta 2 with ASP.Net 2.0 and C#.I run the application and it work correctly with http://localhost:port/projectname/page but not with...
1
10870
by: henrycortezwu | last post by:
Hi All, I'm trying to connect to a virtual port (COM19, OUTGOING, "Bluetooth Serial Port") using VS2005 System.IO.Ports. When I ran the ff code below here's what happens. 1) VS2005 Compiles w/o...
1
3183
by: Jimmy Zhang | last post by:
Hi, I was using JLCA to convert some code to C# and app performance just dropped a bit, I am wondering if any one can point me to some good reference on C# performance tuning tricks... Cheers, jz
23
4109
by: Marco | last post by:
Could anyone please tell me why the program has the following error? I copy the program from http://www.beyondlogic.org/parlcd/parlcd.htm ...
0
1249
by: stewart | last post by:
Hi. I have an asp.net web application. Normally when i want to build and run it I press CTRL + F5, this starts the cassini web server and opens a browser window where the url is...
4
6223
by: nmrcarl | last post by:
I'm trying to upgrade a large project from VS 6.0 to VS 2005. After fixing a lot of things that changed (mostly sloppy coding in the original project that VS2005 didn't allow), I got the release...
0
7044
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6908
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7045
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6741
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5341
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4483
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2995
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
563
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
182
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.