S
samadams_2006
Hello,
Given the following snippet of code:
----------------------------------------------------------------------------------------------------------------------------------------------------------------
namespace OurWS
{
[WebService(Namespace="http://aprior.xenor.com/OurApps/OurWS")]
public class DataPublisher : System.Web.Services.WebService
{
OurUtil autil;
private const string gc1_REGISTRY_KEY = "SOFTWARE\\OfficeApps\
\OurWS"; private const string gc1_REG_DB_CONNECTION =
"ConnectionString";
public InfoPublish()
{
InitializeComponent();
autil = new CommonUtils(GetConnectionString());
}
----------------------------------------------------------------------------------------------------------------------------------------------------------------
This is what I have in Source Safe, and I've been asked to make a few
changes. My question two fold:
1) In regards to the line:
[WebService(Namespace="http://aprior.xenor.com/OurApps/OurWS")]
As we move this Web Service from DEV --> QA --> PROD, this namespace
will not necessarily be present on the environment in question. For
example, "http://aprior.xenor.com/OurApps/OurWS" may exist in the PROD
environment, but not in the DEV environment. I have been changing
this to:
[WebService(Namespace="http://localhost/OurApps/OurWS")]
on my local PC as I've been modifying this Web Service, but I don't
want to have to change this and recompile the Web Service as I move it
to DEV, then again on QA, then again on PROD. My questions are:
a) Is there a way to perhaps read this NameSpace from a Config
or XML file, so that when I move this Web Service to DEV --> QA -->
PROD, I will only need to change the entry in the Config or XML file,
and not recompile the whole Web Service?
b) Does this matter what this says? I was told that this is
just a name, and that if you move the Web Service to DEV --> QA -->
PROD, it doesn't matter.
2) My second and final question is, as you can see from the code,
there are two registry key entries:
private const string gc1_REGISTRY_KEY = "SOFTWARE\\OfficeApps\
\OurWS"; private const string gc1_REG_DB_CONNECTION =
"ConnectionString";
The program is currently getting the connection string information
from these registry keys. I would like to get this info from a Config
or XML file instead. What is the best solution to this problem?
Thanks
Sam
Given the following snippet of code:
----------------------------------------------------------------------------------------------------------------------------------------------------------------
namespace OurWS
{
[WebService(Namespace="http://aprior.xenor.com/OurApps/OurWS")]
public class DataPublisher : System.Web.Services.WebService
{
OurUtil autil;
private const string gc1_REGISTRY_KEY = "SOFTWARE\\OfficeApps\
\OurWS"; private const string gc1_REG_DB_CONNECTION =
"ConnectionString";
public InfoPublish()
{
InitializeComponent();
autil = new CommonUtils(GetConnectionString());
}
----------------------------------------------------------------------------------------------------------------------------------------------------------------
This is what I have in Source Safe, and I've been asked to make a few
changes. My question two fold:
1) In regards to the line:
[WebService(Namespace="http://aprior.xenor.com/OurApps/OurWS")]
As we move this Web Service from DEV --> QA --> PROD, this namespace
will not necessarily be present on the environment in question. For
example, "http://aprior.xenor.com/OurApps/OurWS" may exist in the PROD
environment, but not in the DEV environment. I have been changing
this to:
[WebService(Namespace="http://localhost/OurApps/OurWS")]
on my local PC as I've been modifying this Web Service, but I don't
want to have to change this and recompile the Web Service as I move it
to DEV, then again on QA, then again on PROD. My questions are:
a) Is there a way to perhaps read this NameSpace from a Config
or XML file, so that when I move this Web Service to DEV --> QA -->
PROD, I will only need to change the entry in the Config or XML file,
and not recompile the whole Web Service?
b) Does this matter what this says? I was told that this is
just a name, and that if you move the Web Service to DEV --> QA -->
PROD, it doesn't matter.
2) My second and final question is, as you can see from the code,
there are two registry key entries:
private const string gc1_REGISTRY_KEY = "SOFTWARE\\OfficeApps\
\OurWS"; private const string gc1_REG_DB_CONNECTION =
"ConnectionString";
The program is currently getting the connection string information
from these registry keys. I would like to get this info from a Config
or XML file instead. What is the best solution to this problem?
Thanks
Sam