|
Hi Mark
This works
Dim the_string_final As String = WebConfigurationManager.ConnectionStrings("SL2010WSConnectionString").ToString()
Thanx
Ok now next question, How do I edit this field in the web.config file?
|
|
|
|
|
HI
I tried this
Dim Config As System.Configuration.Configuration = WebConfigurationManager.OpenWebConfiguration("/SL2010WS")
Dim csSettings As New ConnectionStringSettings("SL2010WSConnectionString", new_string)
Dim csSection As ConnectionStringsSection = Config.ConnectionStrings
csSection.ConnectionStrings.Clear()
Config.Save(ConfigurationSaveMode.Modified)
Return (new_string + " was saved to web.config")
As soon as I try to save the file then the VS tells me I do not have access to this file.
I checked but the file is not read only
|
|
|
|
|
My web service[say, webmethod startstoptheservice()] and my windows service[say Service1] both reside on the same machine.
I am creating another web application(residing on a different web server) that will access the webmethod startstoptheservice() to monitor(start/stop/restart) the service1.
[I am able to monitor the service1 from a windows application.]
But when i try to do the same using above mentioned method some error message saying access not granted is displayed.
A part of the error message includes:
System.ComponentModel.Win32Exception: Access is denied --- End of inner exception stack trace --- at System.ServiceProcess.ServiceController.GetServiceHandle(Int32 desiredAccess) at System.ServiceProcess.ServiceController.Stop() at HPClient.ServicesAgent.StartStopTheService() in....
Is the solution i am envisioning to monitor a windows service remotely really possible...? What may be the possible solution to the problem i am having at present.Any ideas/suggestions/comments or pointers would be appreciated.
rabindra
|
|
|
|
|
Yes, Use WMI. This is simple and you can do all task which you can do it window console. Infact you can fire queries also.
Amit
|
|
|
|
|
Hi,
I need your suggestion, I have created an Windows service to mointer my mail id, it stores the content of the mail in the data base. I want to install my service in an remote system. I dnt know how to do it.
Plz suggest me how to install it in remotew machine........
Thanks in advance
Bye
Exelio
Know is Drop, Unknown is Ocean
|
|
|
|
|
i want to find a substring from a string.
like i have a string
str ="/abc/xyz/sdg/"
and i want to find "xyz" then could i achieve this
thanx
|
|
|
|
|
Use the IndexOf to get the start position of "xyz" and then user SubString to get that string out.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
exactly waht i want to do i want to check that whether a particular string is in the string or not?
like
str ="C:\Inetpub\wwwroot\medicaps";
now i want ot check whether a wwwroot is in this string or not.
thanx
|
|
|
|
|
Well that is something completely different you know
Use the IndexOf () method. If it returns a positive number then it contains otherwise id does not.
And this is very basic stuff. Maybe you should read a book or something before developing anything serious...
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
if (youString.Contains("wwwroot");)
//do your thing
|
|
|
|
|
hi friends,
In my application, in one aspx page contains only .aspx.cs file no aspx page in that. Even when i try to run that page it takes to directory list and says that that aspx page is set as forbidden. Please anyone tell me what is the problem. Because I am new to asp.net I dont know how to resolve it.
Prya
|
|
|
|
|
Hi,
I am getting errors when I try to add a new user through the ASP.NET COnfiguration Tool. I'm not sure what it means, and how to fix it. Can some please help??
My SQL membership provider:
<membership defaultProvider="JdssSqlMembershipProvider" userIsOnlineTimeWindow="15">
<providers>
<clear />
<add
name="JdssSqlMembershipProvider"
applicationName="JDSS"
connectionStringName="JdssDatabaseConnection"
description="Stores and retrieves membership data from the local Microsoft SQL Server database"
enablePasswordReset="false"
enablePasswordRetrieval="true"
passwordFormat="Encrypted"
type="System.Web.Security.SqlMembershipProvider" />
</providers>
</membership>
And the error is:
An error was encountered. Please return to the previous page and try again.
The following message may help in diagnosing the problem: Exception has been thrown by the target of an invocation. at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Web.Administration.WebAdminMembershipProvider.CallWebAdminMembershipProviderHelperMethodOutParams(String methodName, Object[] parameters, Type[] paramTypes) at System.Web.Administration.WebAdminMembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) at System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() at System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) at System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) at System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, EventArgs e) at System.Web.UI.WebControls.Wizard.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) at System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I hope someone can help.
Regards,
ma se :->
|
|
|
|
|
How can I dispaly network drives in asp.net(with C#) appliation? How to set authorization to folders in a drive from asp.net?
Thanks,
Bhasker P
|
|
|
|
|
HI
Guys , i know , there are three types of authentication in ASP.Net windows,Form and passport ,what are the purpose of these authentication ?
|
|
|
|
|
|
I have a dropdownlist that is put on a panel. When I scroll the page up & down the control vanishes & reapperars on putting the mouse over the location. How can I fix this problem?
Could somebody help me pls.
Thanks in advance
|
|
|
|
|
I'm trying to make a list of documents that open in another page, i tried 2 ways: using hyperlinks within a datalist and using linkbuttons within a datalist, when i bind to datasource using linkbutton the document opens with the parent page not a new page, but when using the hyperlink with a target window set a dont get links
10.10
|
|
|
|
|
Do you want to open a popup window to display the document? If so the use javascript window.open() function.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi
i wanted to show photo album slide show on web page Please tell which are the possible ways for it and which is the best
|
|
|
|
|
|
Yes
My query is not specific .. i have imgages store at the server.Now i want to show a simple slide show of those images
|
|
|
|
|
Hi,
I would like to install VS 2005 and sql server 2005 to practise developing ASP.NET codes.
The company policy prevents installation of IIS on individual machines.
I have tried installing sql 2005. The installation gives a warning about IIS that some features of sql 2005 do indeed require IIS. AND do not get the management Studio window.
My question is:
Since IIS is not allowed to be installed then can I still reach my objective? (Installing ASP.NET 2.0 and sql server 2005)?
Thanks
|
|
|
|
|
You have to have IIS in order to run ASP.NET 2.0 applications.
What kind of company would like you to learn something, but does not allow you to install the tools you need for that?
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Hi,
VS 2005 does allow you to create ASP.NET pages without IIS. The pages are served somehow through Visual Studio. If you create an ASP.NET page and run it in debug mode, it will run. I know that some parts of SQL 2005 will also run without IIS, but if you find that you need a feature that requires IIS you could have your IT department install it on a server for you. IT would need to set up the proper permissions for you, and set up the databases, but you can then connect to the database remotely through a data provider on your ASP.NET page.
|
|
|
|
|
Hi,
I am trying to access an image from the server, it is visible in the browser, but if i try to provide any querystring parameters the url defuaults to something else, i wanted to know what could be the reason for this behaviour.
e.g.
when i try to access
http://server_/Images/Img01.jpg
works
but
http://server_/Images/Img01.jpg?xyz=1
doesnot work
pls advice
Regards,
Sivaprasad
|
|
|
|