public class WebServiceConfig
    {
        
public static void SetImagePathServiceUrl()
        {
            ImageService.Properties.Settings.Default.Properties[
"ImageService_ImagePathService_FlashImagePath"].DefaultValue = System.Web.Configuration.WebConfigurationManager.AppSettings["FlashImagePathServiceUrl"];
            ImageService.Properties.Settings.Default.Save();
            ImageService.Properties.Settings.Default.Reload();
        }
    }
类库中引用Web服务后地址会写在app.config,在部署时要更改地址,用这种方法需要重新编译下些类库,在调用的项目中调用即可获得最新的app.config中的值。
posted on 2011-04-22 18:05  雨季  阅读(400)  评论(0)    收藏  举报