locked
IIS 7.5 Windows 2008 R2 conundrum with Microsoft.VisualBasic assembly, maybe RRS feed

  • Question

  • User-625067700 posted

    IIS 7.5 Windows 2008 R2 conundrum with Microsoft.VisualBasic assembly, maybe


    So, I have been put in charge of a new server and I am attempting to run an application I developed on my Windows XP box with VS 2008.
    I have VS 2010 on my development box and have upgraded to VS 2010 and .NET framework 4.0 and the application opens and runs ok on my development client.

    However. . .. 

    When I move it over to the new server, which seems to run the page I ask for, but creates an error when called something in the Microsoft.VisualBasic assembly inside my "Functions.cs" code file. It is a C# application that uses VisualBasic string parsing in places. It  works on my development client, but same files moved over to 2008 R2/IIS 7.5 doesn't. (the reference to the assembly is there: using Microsoft.VisualBasic; and in web.config also)

    ===================================================
    Compiler Error Message: CS0103: The name 'Strings' does not exist in the current context

    Source Error:

     
    Line 179:
    Line 180:
    Line 181:            strFront = Strings.Left(strEmailDatabase, lng1 );
    Line 182:            strEnd = Strings.Right(strEmailDatabase, strEmailDatabase.Length - (lng1 + 1));
    Line 183:            string strDisguised = "";
     

    Source File: d:\inetsrv7\wwwroot\App_Code\Functions.cs    Line: 181 


    Microsoft (R) Visual C# 2010 Compiler version 4.0.30319.1
    Copyright (C) Microsoft Corporation. All rights reserved.

    d:\inetsrv7\wwwroot\App_Code\Functions.cs(181,24): error CS0103: The name 'Strings' does not exist in the current context
    d:\inetsrv7\wwwroot\App_Code\Functions.cs(182,22): error CS0103: The name 'Strings' does not exist in the current context
    d:\inetsrv7\wwwroot\App_Code\Functions.cs(188,53): error CS0103: The name 'Constants' does not exist in the current context
    d:\inetsrv7\wwwroot\App_Code\Functions.cs(194,49): error CS0103: The name 'Constants' does not exist in the current context

    Wednesday, January 30, 2013 7:07 PM

Answers

  • User-625067700 posted

    I went back to my development VS 2010 on my computer and "published" the application. I took all those files and moved them to wwwroot on the server, made it an application with the correct appPool, and voila it worked.

    I'm still not sure where everything is/went. This is no App_Code folder anymore that I can see. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, January 31, 2013 1:07 PM