Configuration :: VB To C# Refactoring / Access To The Installs For The VS On This Machine
Aug 27, 2010
I'm currently working on a previously deved app at my company. This application has been deployed at the client and was developed in VB. The source code was lost, unfortunately, and I've been refactoring the code into a C# format. Now, I haven't worked in ASP.NET in some time, nor all that much to be honest,
The application is such that, now that I've got it to start compiling, I have to compile it in a testing environment that emulates the Live Environment. (Need to be logged in as an AD User with certain permissions and roles.) Unfortunately these permissions are persisted from another web application that is used to launch this application.
What I've got set up is a couple VM's running on a testing server. One hosts the actual Web Apps (The IIS Box), one hosts the SQL and one hosts the AD. As these box's are basically copies of the live environment, the IIS box currently hosts the VB version of the app. I need to be able to deploy my code over the existing application (VB to C#) so that my app will run. It's a round about way of doing it, but I don't have access to the installs for the VS on this machine. What would be the best way to go about doing this?
View 1 Replies
Similar Messages:
Nov 14, 2010
I have a Windows Service I have developed in Visual Studio 2005 (C#).
It accesses a database using a connection string in machine.config.
On my Windows XP Pro 32bit (SP3) machine, it works correctly.
On my new Windows 7 Pro 64bit machine, it throws "object not set to an instance of an object" when it gets to the line where it's trying use the connection string.
This is the 'object' which is not set in Windows 7:
ConfigurationManager.ConnectionStrings["MyDatabase"].ConnectionString
The machine.config has the same connection string set up on both machines.
A .Net 2 website transferred to the Windows 7 machine has no problem accessing the same connection string.
I have tried a bunch of different permissions on the machine.config and its containing folders, and setting the service to log in as Admin, but I don't know exactly what permissions are required.
View 1 Replies
Jan 7, 2011
I have been spinning my wheels now for awhile trying to figure out how I can possibly unit test the following code. At first I was going to use Moq to mock everything, but it doesn't include the ability to mock sealed classes. I know I need to abstract out the calls to the implementation (Configuration) using an interface? but I can't seem to make it all work right. The code can be altered but I would prefer to keep the methods static, unless you can present a compelling reason not to. You can add interfaces or create whatever seams are needed. Also, GetConnStringByName() can be refactored to return the relevant string instead of a ConnectionStringSettings. Thoughts?
namespace Stackoverflow.Rocks
{
/// <summary>
/// Utility class for progmattically selecting values from the Web.config file.
/// </summary>
public class WebConfigStrings
{
//private static Configuration myConfiguration = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(HttpContext.Current.Request.ApplicationPath);
/// <summary>
/// Retrieves the desired connection string value based upon the target name.
/// </summary>
/// <param name="connectionStringName">The target connection string referenced in the Web.Config</param>
/// <returns>The value specified in the Web.Config by your connectionStringName</returns>
public static ConnectionStringSettings GetConnStringByName(string connectionStringName)
{
Configuration rootWebConfig = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration(HttpContext.Current.Request.ApplicationPath);
ConnectionStringSettings connString;
connString = rootWebConfig.ConnectionStrings.ConnectionStrings[connectionStringName];
return connString;
}
/// <summary>
/// Retrieves the desired application string value based upon the target name.
/// </summary>
/// <param name="applicationStringName">The target application string referenced in the Web.Config</param>
/// <returns>The value specified in the Web.Config by your applicationStringName</returns>
public static string GetAppStringByName(string applicationStringName)
{
string appString = "";
appString = ConfigurationManager.AppSettings[applicationStringName];
return appString;
}
}
}
View 3 Replies
Jul 21, 2010
There are a bunch of hardcoded strings in a ASP.NET application.
eg. string constSetting = "XYZ";
There are a LOT of them. Is there a tool/plugin for Visual Studio 2008 to refactor it in such a way that the constant string goes into web.config and the above line gets replaced by the retrieved string from web.config app settings?
View 2 Replies
Apr 12, 2010
I have like 10 private members in my class, and I was hoping vs.net could create public properties from them but can't seem to find that option in VS.NET 2008.
Is there a feature for this?
View 1 Replies
Jan 10, 2011
i have gone through the plenty of sites telling about installing 32 bit application in 64 bit machine.can anyone guide me through site which tell in simple way how to craete msi from 32 bit application,to run on 64 bit machine? and how it actually works the 32 bit ,64 bit application concept
View 3 Replies
Jul 12, 2010
I developed a test application using VS 2008 (ver: 9.0.30729.1. sp) and .net work (ver:3.5 sp1) using master pages,style sheets, ajax extenders etc.
I moved the whole website to another machine running VS Team System 2008 (windows xp) with the same above versions. The functionality of the application works fine, but the stylesheet seems to be affected. I have centered the whole application (fixed 960px). But when I ran the same app in new machine running windows xp the content area is getting floated or left justified. Is there anything that I need to take care when I move from one os to the other. What is causing this behavior? I tested using IE 8.
View 4 Replies
Jan 18, 2011
I had created a data driven website with back end as Mysql and i want to deploy on the client machine.
Is it really necessary to create a Web Application to deploy instead of website?
And if it does how to add the current web site to a new web application ?
How to configure the website/web application ready to deploy ?
TO deploy on the client side , including all major and minor settings including prerequisites?
View 6 Replies
Dec 27, 2010
We have staging server and production server for website. We will move the changes from the staging server to the Production server through the FTP.
Since we have the product release for every 3 months. So, we need to redirect to the latest version in the Production server IIS. Is it possible to access the Production server IIS and redirect the web site link from staging server ?
View 2 Replies
Jun 25, 2010
I have used autocomplete extender in my web application. It works perfectly on localhost, but when i try to access from different machine its not working.
View 6 Replies
Jun 9, 2010
i have created a bat file to run the aspnet_regiis exe to encrypt the connectionStrings of web.config file on the remote machine. the same is working when i ran the file on remote machine itself. but is it not working when i call it from another bat file from my local machine which is shared with remote machine. my code loos like:
<remote_server><frmaework_path>aspnet_regiis.exe -pef "connetionStrings" <remote_server><physical_path_application>
<remote_server><frmaework_path>aspnet_regiis.exe -pa "netfrmaeworkconfigurationkey" "ASPNET"
View 2 Replies
Mar 5, 2011
how can i access client machine's specific file contained in a drive or folder.Suppose in Server side i have knowledge of full path of a file that is present in client side, like "D:ABCFolderxyzFile.doc", this is a file that i want to retrieve and store in server side .
View 8 Replies
Oct 31, 2010
I have connection strings info in web.config. I thought that if this were the case, machine.config would be ignored. But, everytime the connection string in web.con is different than the connection string in maching.con, I get error. The connection name 'aspnetdbConnectionString' was not found in the applications configuration or the connection string is empty. Is there something I can check or change to get the app to ignore the machine.config when web.config connection string is listed.
View 4 Replies
Jan 25, 2011
I am developing the web application in Asp.net 2008 under WinXP SP2 32bit. I am able to publish it in the local system and Test server. When i move this to production sever i am facing problems. The production environment OS is Windows Server 2003 Standard 64bit. When i am accessing login page i am getting this error "../../login.aspx/ has not been pre-compiled and cannot be requested". What could be causing the error message? Any IIS settings, or .NET 2.0 settings which prevents IIS from loading the compiled files?
View 1 Replies
Jun 24, 2010
We have a large multi tenanted website which requires thousands of lines of web.config to support it. As the system grows we are finding it more and more difficult to manage this configuration file.The system currently in place uses XSLT to generate the config but this solution seems to involve a lot of duplicated code (we have 12 deployment environments).
I am leaning towards putting the configuration data in the db so we can be sure that it's deployed with the application and that our release notes don't require the IT guys messing around with XML
What are better solutions we could use?
View 3 Replies
Mar 20, 2011
I have developed a small website to be hosted in my client's office (intranet). This is my first website. I don't know how to deploy it.!! We can run it by copying and pasting the whole project folder in their server. But if we do like that they can modify the code whenever they need.
View 2 Replies
Dec 13, 2010
I asked a question in another forum about SQL Server 2008 R2 Developer Edition and the number of simultaneous users it supports. I was told that there was no limit on the SQL Server 2008 R2 Developer Edition itself with regard to the number of simultaneous users that could be connected but that Windows 7 has a limit of 10 simultaneous logged in users. So my first question lead me to another question. 10 users is fine for debugging and small testing but what route do I take when my site goes public and needs to service more than 10 users at once? Am I even supposed to be running a public website on a Windows 7 Operating System or is that a job for Windows Server 2008 R2? If I purchase Windows Server 2008 R2 do you purchase a license for a specific amount of simultaneous users?
View 5 Replies
Aug 13, 2010
I have a website project in VS 2005 using VB. From it I connect to a web service that sends an email. This was running just fine until my department moved locations (and along with it the server hosting the service). Now my project can't connect to the service. I deleted and added the web reference again and VS found it and it's methods just fine. I can browse to the service in my browser successfully.
The emails are no longer getting sent and there is no error raised. I tried debugging and when I step into the call to the service then I get the error "Unable to automatically step into the server. Connecting to the server machine '[mywebservice]' failed. ...". I do not need to debug that service; I was only confirming that the project wasn't connecting.
When the project is loaded onto our virtual server for testing it runs as expected.
How can I get my project to connect to the web service from my localhost as it was before the machine was moved?
View 2 Replies
Jul 23, 2010
With the project I'm working right now, the team and I don't believe the network/computer policies will allow us to create and save Excel files on a local machine through the Web pages we're building. Well, let me clarify. When we run our web pages on our development machines, when we go to save information to excel through the web page, it uses our local excel executable. However, we want it to use the web server's excel executable. When we run the website, we're running individual local copies because we don't have a web server to test on, so we can't verify if it will use the Web Server's or ours. Does anyone know what it will do, or if it has to be programmatically set a specific way to use excel on the web server, and not on the local machine. Once we get the Web Server to use excel, we'd save the file to a network share that would allow the user to view the file.
View 2 Replies
Jun 1, 2010
I'm trying to deploy a website stored on a network shared storage. My problem is that I am unable to load assemblies that reside on the remote machine.I load some assemblies by using
assembly = Assembly.LoadFrom(Uri.UnescapeDataString(new UriBuilder(satelliteExpectedLocation).Path))
where the satelliteExpectedLocation is in the form "file:\10.0.0.85 mpappinMessages.resources.dll".
I got a FormatException on this one, so I modified the path to read "file:////\10.0.0.85\tmp\app\bin\Messages.resources.dll"
Now I get a "System.IO.FileNotFoundException".I read on MSDN that the "File" scheme is to be used for resources on the local machine. But how should I get the resources on the network share?
View 2 Replies
Mar 15, 2010
We have a problem regarding decrypting the web.config... We encrypted the web.config in computer A. but we need it to decrypt it in computer B.
we got an error
"Failed to decrypt using provider 'DataProtectionConfigurationProvider'. Error
ssage from the provider: Key not valid for use in specified state. (Exception
om HRESULT: 0x8009000B) (D:WCFSearchweb.config line 17)
Key not valid for use in specified state. (Exception from HRESULT: 0x8009000B)
Failed!"
we also tried the RSAProtectedConfigurationProvider and we're not able decrypt also...
I search google and found this unfortunately we can't decrpyt it... How do i include the key? do i need to copy and paste it?
View 6 Replies
Feb 1, 2011
I have to host an asp.net that user can access that website something like http://111.11.11.11/myapp/homepage.aspx. ( my ip address will be 111.11.11.11). All I have local IIS installed. I want that if any user clicks on the link. He should be able to access that web application.
View 9 Replies
Oct 18, 2010
As i have created an vistor page ,where i use to get client IP Address and date nad time of visit?
View 4 Replies
Apr 29, 2013
Is there a way we can access image files from client machine in asp.net?
View 1 Replies
Dec 29, 2010
i developed an asp.net web site and i used ModuleRewriter to rename my pages you can refer to this link [URL] and i want to add many pages programatically at run time for example i have a page named :
[URL]styles/defaultstyle/Default.aspx
and i want to display this page like this :
[URL]Default.aspx
so my code was like this :
public static void confgrewriter()
{
try
{
RewriterRuleCollection rules = RewriterConfiguration.GetConfig().Rules;
RewriterRule r = new RewriterRule();
r.LookFor ="~/Dfealut.aspx" ;
r.SendTo ="~/styles/defaultstyle/Default.aspx";
rules.Add(r);
}
catch (Exception ex)
{ }
}
and this solution is working very good on iis at my local machine but when i did upload this website on shared host i recive error message: The resource cannot be found.
Description:
HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. review the following URL and make sure that it is spelled correctly.
View 6 Replies