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中的值。

相关文章:

  • 2021-06-19
  • 2022-12-23
  • 2021-05-16
  • 2022-01-29
  • 2022-01-23
  • 2021-12-08
  • 2021-09-12
猜你喜欢
  • 2021-11-17
  • 2021-12-11
  • 2021-10-21
  • 2022-12-23
  • 2021-10-17
  • 2021-11-12
  • 2021-07-16
相关资源
相似解决方案