I'm editing my web.release.config file for production. I want the web.config file changed after a publish.
I found how to change the web.config by using the web.release.config file properly, but not for this particular component.
I just upgraded to VS 2010 and MVC 2.0 and I noticed the web.config has two additional files attached to it? Are these files used to specify debug and release specific settings, so you don't clutter up the main web.config?
Does it even make sense to place a connection string in the root web.config file if I have have a local and remote one in the debug and release web.configs respectively.
I am trying to put the namespace value as a key in web.config file, so that when I deploy this on production, I just have to change the namespace key in the config file only, not on all of my webservice cs files. But When I try to browse this webservice after changing this code I get compilation error.
web.config:
[Code]....
MyWebService.cs (this code works)
[Code]....
Compiler Error Message: CS0182: An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type
I need to change the location of a web service. During development, I've made a reference to a web service in my local computer in my Visual Studio web site, and with the following command I use it
Dim LoginService As localhost.IPelosaLoginservice = New localhost.IPelosaLoginservice
Because I used localhost it works fine even after deploying to a production web server.
By adding a web reference in Visual Studio, the web.config is update with a key containing the name of the service and the path.
Now I need for one customer to change the path of the web service (because they work with a modified one). How do I do this? I've changed the path in the web.config, but that doesn't seem to make any difference.
I can't believe that you have to change you're code, add another web reference and deploy the program. There must be a better way, since I want the code for the web sites for alle the customers to be the same.
My scenario is create a webservice(regional weather prediction, or currency rate), and a client application having a updatepanel and then consume that service.Now, when webservice changes its data(temperture goes up or down, rate changes)I want to ask is there any way client can aware that webservice has changed so it will update properly.
I am going to deploy my Application on server but instead of specifying connection string (servername .server userid , password) in web.config manually is their any way of entering the server details in the web.confi file dynamically from client side when i first run the application.
in the starting page the user must specify the server details and database name from which he want the data to be loaded .And once i enter the server details it should bepermanently stored in the web.config file instead of dataabse.
I have a web-application with more than 5 themes. Each themes covers a completely different style for different customers. whenever we publish a new version of our application we send it for all of customers.
We specify theme in web.config file in <Page> tag. like
<page theme="Theme1" /> // or Theme2 for second customer.
with this approach we easily change the style of application from each other without writing codes which needs a new publish for each one.
With changing the theme="Theme1". nothing change and we didn't write a code in application , so why changing theme don't change the theme and we need a new publish?
we want to change it in web.config or somewhere else and with changing it the theme change without needing a new publish for each one.
Update :
I Publish Once and then copy the published version for each customer (5 times) then in each web.config file I change the theme="CustomerTheme". but only the theme which was active in publish process is usable in all of 5 versions and other 4 themes are un-usable Actually the main question is that why changes in Web.Config need a different publish while it is XML and do not need a complie. I should Add this note that, App_Theme include all of 5 themes so that all of them Compiles and are ready to use
This is the way I publish the application
Photo Link
Update 2
here IFound the exact problem reported by someone else. he resolve the problem but I can't underestand how he resolved this Issue.
I want to add a new rule in my web.config file programmatically,
ex: I have a textbox to add location path I have a combobox (with items admin and user) to add roles. ex: user input location path = textbox roles = combobox (items admin and user) the save button, when click the save button the results go to the web config :
can i change the culture info from a linkbuttothe problem is like this : on the site i use 2 languages, english and romanian. in web.config the default culture="ro", and i was wondering if on clicking the link button, to change to english version, i can somehow change the culture info to culture="en-us".
I have a website that has 2 databases and 2 folders , what I need to do is to create a combo box and if the user select " project1" I should see the tree that populates its data from the first database if user selects "project2" I sshould see the tree that populates its data from the second database , both the 2 trees will be populated in the same page following below is the part of the connection string and folder values for 1 selection but how can i add another one and change it on the fly from the combo box selection
I need to add a dropdown box to my login page that allows the user to change the connectionString to a different string, e.g. "LDAP://ActiveDirectoryDomain2.com"
In C# code behind how do change the connectionString value?
More info:
The problem I am having is that there are 4 other web.config settings call that one connectionString. For example:
I'm developping an ASP.NET web applition which will be running on a intranet server. The web application will read and write data from / to an access mdb.
The link to this mdb is specified under the web.config file. However, in this web.config, the connection string points to a absolute path (for ex. c:information.mdb).
Is it possble to change this path after the web application is installed on the server (without having it to open in visual studio)? This is needed, because the application will be installed at other locations too, all pointing towards their own server and mdb (and this mdb file won't be always be on the c: drive).
I tried opening the web.config file with notepad, and changing it. Everything seems to work, but I'm not sure this method is good. Since I assumed you have to rebuild the application if you change somthing in the code...
I am trying to update the enablePasswordReset from false to true programmatically but am struggling.. This is as far as I got!
ConfigurationManager.OpenWebConfiguration(Request.ApplicationPath); var section = (MembershipSection)config.GetSection("system.web/membership"); var defaultProvider = section.DefaultProvider; var providerSettings = section.Providers[defaultProvider]; // Now what?
I have a custom security module which is retrieving the applicationName of the defalut Membership Provider. I am using this value for convenience only. I mean, sometimes, I will authenticate the user as per "Windows Authentication" where there is no Login Form, and yet, I need to access the "applicationName" of the membership provider.So, in some of my applications, I am not using a memberhsip, and I leave it empty. And I found out that if the <membership> is not defined in web.config, it will default to "AspNetSqlMembershipProvider" type "System.web.Security.SqlMembershipProvider".I can add an key in <appSettings>, but I like to using the applicationName of the default membership provider, becuase in other applications I am using Forms Authentication, with a custom membership provider.If try to setup a dummy memberyship provider, I will get error that the connection string is empty.How I can set the "applicationName" property in web.config if I am using "Windows" authentication, and I have no membership provider ?
i have list box, in that list box have some fields(SQL Table fields) in run time i arrange the fields(based on my requirement order) , based on the list i want to change the columns in data table dynamicaly. how i change the columns in the datatable.
I've change it to passwordStrengthRegularExpression="^(?=.{8,15}$)(?=.*[0-9])(?=.*[A-Z]).*" however it still keeps coming up telling me that I need at least 7 characters and one nonAlphaNumberic... I looked at my machine config and made some adjustments there so that
minRequiredPasswordLength="" minRequiredNonalphanumericCharacters="" were blank
I will explain the my current yet simple architecture of my application(s). At the moment I have my main web application as a separate project. I then reference the CoreBLLDAL (Business Logic and Data Access) Project so that several projects can have access to the BLL/DAL Project.
Within the CoreBLLDLL Project I use TableAdapters for my DAL.
I have just upgraded to VS2010 and I would like to make use of the Config Transforms, allowing me to have a separate web.config for test and production - however, TableAdapter get the connection string from the Settings.settings file.
How can I change the TableAdapters to get the connection string from the app/web.config file? I read that you can change this within the designer file for the TableAdapters by using ConfigurationManager, however, I tried this but I do not have access to the ConfigurationManager namespace. I presume this is because the project is a class library and not a web application - I am not too sure.
14 days ago all emails were being delivered without any error, but now none of the email is delivered neither from local site nor from hosted site.I did not change any single letter of code in web.config and in pages.
Web config file is as follows. <appSettings> <add key="MailFromAddress" value="<user name>@gmail.com"/> <add key="MailToAddress" value="<user name>@gmail.com"/>[code]....
myMessage.From = New MailAddress(AppConfiguration.MailFromAddress, AppConfiguration.SenderName) myMessage.To.Add(New MailAddress(AppConfiguration.MailToAddress, AppConfiguration.ReceiverName))
Dim mySmtpClient As New SmtpClient() Try mySmtpClient.EnableSsl = True[code]....
On debugging it always fires the catch block. Earlier I never had such problem with emails but for last few days none of the email is being delivered.Is it my system problem? Is it any port no. issue? My local site and remote site are not delivering any message. what could be the reason and how I make it functioning as before.