web-config

Creating Custom Binding programmatically

坚强是说给别人听的谎言 提交于 2020-01-15 10:06:23
问题 We need compression in our WCF Web Service and have already found a good solution: http://www.codeproject.com/Articles/53718/Extending-WCF-Part-II There's only one problem. Configuration files are no option. How those Custom Bindings can be created in code? <customBinding> <binding name="ZipBinding" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"> <customMessageEncoding innerMessageEncoding="mtomMessageEncoding" messageEncoderType=

Creating Custom Binding programmatically

假装没事ソ 提交于 2020-01-15 10:06:00
问题 We need compression in our WCF Web Service and have already found a good solution: http://www.codeproject.com/Articles/53718/Extending-WCF-Part-II There's only one problem. Configuration files are no option. How those Custom Bindings can be created in code? <customBinding> <binding name="ZipBinding" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"> <customMessageEncoding innerMessageEncoding="mtomMessageEncoding" messageEncoderType=

Endpoint not found when accessing via URL in a browser

点点圈 提交于 2020-01-15 09:21:09
问题 When I enter the address of my service, I get to see the WSDL file. However, When I add a suffix to the URL, I get the error message: "endpoint not found". It's definitely due to something wrong with my service model declaration but after a few hours, I'm inclined to admit that it's beyond me. I've made sure that the namespaces are correct as discussed here. The first URL works. The other, don't. http://---.azurewebsites.net/MyService.svc/ http://---.azurewebsites.net/MyService.svc/Ping http:

ASP.NET 4.5 Ajax works fine on local but Ajax client-side framework failed to load when hosted in a web server

我是研究僧i 提交于 2020-01-15 07:45:08
问题 I am using ScriptManager and UpdatePanel in my website and every thing works in local machines when it was debugged from visual studio 2012 but when its hosted in web server it gives couple of erros: Uncaught Error: ASP.NET Ajax client-side framework failed to load. Uncaught Reference Error: Sys is not defined and also it doesn't load scriptresources.axd file as it was saying 500 Internal Server Error 回答1: I have changed my web.config file to the one as below <modules> <add type="DevExpress

reading content of an config file into the dll associated with it

a 夏天 提交于 2020-01-15 03:50:37
问题 I have saved strings in a dll application's setting. I want to retireve them. Here is the configuration file for my dll: <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxxxxxxxxxxxx" > <section name="Search.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture

Cannot reference custom event from web.config

社会主义新天地 提交于 2020-01-14 13:46:21
问题 I've written a custom event MyWebErrorEvent derived from WebErrorEvent located in the App_Code folder of my ASP.NET 2.0 Web Site Project. The class MyWebErrorEvent is not contained within a namespace. I've put the following into my web.config file: <configuration> <system.web> <healthMonitoring> <eventMappings> <add name="Event1" startEventCode="0" endEventCode="2147483647" type="MyWebErrorEvent"/> </eventMappings> </healthMonitoring> </system.web> </configuration> At compile time and run

The sessionState timeout doesn't work with the DefaultSessionProvider

白昼怎懂夜的黑 提交于 2020-01-14 10:38:08
问题 I have a web site where I use ASP.NET membership for managing user creation, login, role management. I use Visual Studio 2012. There are a lot of elements created by Visual Studio in web.config. One of the element related to session state is the following. sessionState mode="InProc" customProvider="DefaultSessionProvider" name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35

web.config single user basic auth

核能气质少年 提交于 2020-01-14 10:23:19
问题 In nginx I can create a authentication response which sends WWW-Authenticate:Basic realm="Private Network" causing a login for a single user/password to popup without creating a login.aspx Here's my config settings <security> <authentication > <anonymousAuthentication enabled="true" userName="test" password="test" /> <!--<basicAuthentication enabled="true" logonMethod="Batch" />--> <!--<windowsAuthentication enabled="true" />--> </authentication> </security> <authentication mode="Forms">

How can I set infinity session time out in asp.net project

↘锁芯ラ 提交于 2020-01-14 09:45:15
问题 I'm working on asp.net project. how can I increase the session timeout? (infinity timeout) Or should I do this on IIS? If it is possible, please explain. 回答1: You can set session timeout in web.config as shown below. The value is showing minutes, so you can set as long as you want, up until a year. <configuration> <system.web> <sessionState timeout="200"></sessionState> </system.web> </configuration> The Timeout property can be set in the Web.config file for an application using the timeout

Getting “EndPoint Not Found” error with WCF service deployed to SharePoint 2010 site

独自空忆成欢 提交于 2020-01-13 18:24:26
问题 I am trying to utilize the autocompleteextender from the ajaxcontroltoolkit in one of my sharepoint solutions (which requires an older version of the library since all of the recent ones require the .NET Framework 4.0) and unfortunately I can't use a page method in a UserControl, only in an actual page. Therefore I am left with only the one option which is to use a method from an actual web service. The problem is that I can't seem to figure out how to correctly deploy the service and