|
You need to do it all in the RowDataBound event - find the textbox and use its ClientID property as the argument for your function call - which you will also have to build dynamivally in the same place.
|
|
|
|
|
I have a application that is running live , I want to run the application on my local system so that some changes can be made.
I am attempting to use the Enterprise Library Cryptography block to encrypt a credit password in my ASP.NET 3.5 application. Everything is configured correctly,and not getting any error when I build he application but When I call the DecryptSymmetric () method, I get this error:
The system configuration source is not defined in the configuration file.
[System.Configuration.ConfigurationErrorsException] = {"The system configuration source is not defined in the configuration file."}
Stack trace:
at Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceFactory.Create()
at Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.Cryptographer.DecryptSymmetric(String symmetricInstance, Byte[] ciphertext)
at Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.Cryptographer.DecryptSymmetric(String symmetricInstance, String ciphertextBase64)
at UserControls_LoginUserControl.SetUserAthent
My web.config contains the following (relevant) sections:
<configSections>
<section name="OnLineStudentPortal.Data" type="OnLineStudentPortal.Data.Bases.NetTiersServiceSection, OnLineStudentPortal.Data" allowDefinition="MachineToApplication" restartOnExternalChanges="true"/>
<section name="enterpriseLibrary.ConfigurationSource" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceSection, Microsoft.Practices.EnterpriseLibrary.Common, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</configSections>
<location allowOverride="false" path="Application">
<enterpriseLibrary.ConfigurationSource selectedSource="File Configuration Source">
<sources>
<add name="File Configuration Source" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.FileConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" filePath="entlib.config"/>
</sources>
</enterpriseLibrary.ConfigurationSource>
</location>
pz let me know What is the solution of the above issue. I am searching it on google from last 4-5 hrs but did not get any solution , please let me know if any body have any other finding or anything I have missed .
|
|
|
|
|
Are you sure entlib.config is in the right folder and that it is formatted correctly with all of the required info? The first google hit[^] when searching for your error shows an example with all three files, but you only show two.
|
|
|
|
|
I have changed only ProtectionKeyFilename in entlib.config section
like this
<securitycryptographyconfiguration>
<symmetriccryptoproviders>
<add algorithmtype="System.Security.Cryptography.RijndaelManaged, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
="" protectedkeyfilename="G:\Projects\Application\OnLineStudentPortal.key" protectedkeyprotectionscope="LocalMachine" type="Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.SymmetricAlgorithmProvider, Microsoft.Practices.EnterpriseLibrary.Security.Cryptography, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" name="SecureInfo">
I am not analyzed that what changes i have to do? can u pz tell me what other more chages i will have to make in my application.
modified on Friday, August 27, 2010 1:56 AM
|
|
|
|
|
Hi
I have a wizard, which contains a series of custom user controls as steps. Also I am using the step navigation template to add in the navigation buttons.
However, due to some steps needing a little time to load fully due to web service calls and having to add some dynamic steps, I would like to disable the navigation buttons until the next step has been loaded and change the text on the "Next Button" to "loading...". Is there away I can do this perhaps with JavaScript or is there away I could do this with an AJAX control? If so, does anyone have an example I could use?
Thanks
|
|
|
|
|
I am using version 3.1 of Enterprise Libraries and used the EntLibConfig app to configure my logging options. I set it up to send me an email if an exception occurs.
I am doing this to allow Ent Lib to handle the exception:
bool rethrow = ExceptionPolicy.HandleException(ex, "Clerical Exception Policy");<br />
<br />
if (rethrow)<br />
throw ex;<br />
What I get is an error coming back saying 'Logon failure: unknown user name or bad password'
The exception appears to be when it calls GetExceptionPolicy.
However, I am not doing anything, or shouldn't be doing anything, that requires a username and password. Inside the EntLibConfig application I set the 'RequirePermission' flag to False under the Exception Handling section.
Any idea's what could be causing this? I did try using impersonation inside my web.config and no luck. Thought maybe the ASP.Net account didn't have permission to do something.
Thanks.
|
|
|
|
|
Hi,
I am developing a sample project using MVC and Entity framework. just wondering to know how can I use silverlight? Is it possible? Does silverlight pages use instead of aspx pages?
thanks in advance for your help,guys.
|
|
|
|
|
Hi,
In old style i used to return datasets to BOL (From DAL) and then to Website. but in 3.5 is there any new way to construct DAL. i heard about returning List<> is better than DataSet. Please suggest me which is the best way.
I Got to build new DAL for my new project. if i should go for List <> aprroach can i use Linq to Sql technique or shall i go for execute dataset (using applicatio block libraries) and then fill data in List<> prior to return it back to BOL.
Thanks
Naidu
vrsanaidu
asp.net webdeveloper
|
|
|
|
|
I voted this as a bad question not because it is a bad question but because it is not a good one. Some one keeps marking questions as good when they are, in-fact, neither good nor bad.
There are a lot of ways to construct a DAL and there are many tools which will purport to do all of the work for you. However, there is one thing none of those tools will do and that is help you to understand the business requirements. Time and again I see duplicated and wasted effort from DAL Generator based systems because no one took the time to ask why, knowing, it is trivial to rewrite the DAL.
Personally, I prefer hand coding, if for no other reason that it forces me to understand the object graph that is being constructed and to choose the most effective manner for doing so without fighting a tool-kit. Write your DAL yourself and you will learn a lot. 3.5 makes it really easy with automatic properties.
Below is a quick sample, it is real easy and there is no magic anywhere. Any developer should be able to figure this out:
public class Customers : List<Customer>{}
public class Customer : IEntity{
public Int32? Id{get;set;}
public string Name{get;set;}
public DateTime CreateDate{get;set;}
internal static Customer Create(SqlDataReader reader){...}
}
|
|
|
|
|
Some of the most common reasons people give for using List<T> instead of datasets are:
Datasets are big and come with a lot of overhead.
Datasets are subject to more runtime errors due to data type issues.
List<T> gives you access to all sorts of cool extension methods in Linq which are also compile time checked versus using sql filters on datasets which are runtime checked.
You could jump straight to 4.0 instead of 3.5 and use Entity Framework[^].
|
|
|
|
|
Once upon a time I lived in hope that someone somewhere could show me the correct way to structure an application and pass data between the layers.
I gave up, because there is no right way.
There is virtually no point in trying to figure out whether it's better to pass around DataSets, Lists, XML, or some other representation of your data.
You would not only have to figure out the verious pros and cons of each method, you'd be confused into a stupor by trying to seperate facts from the quasi-religious views of the very "experts" that would be offering to reveal the facts.
So. Forget for one second that there are Datasets and Lists etc. Figure out what constraints are in place, then figure out what service you're Data Layer needs to perform and then work from there.
For example...NHibernate is cool, but If your organisation won't let you install NHibernate then NHibernate is out immediately. Simples.
Next try and figure out as many different ways of moving data around that fit within your constraints. Actually build a few vertical slices of applications. You'll learn more from doing this that from reading 100 pro/con articles.
DataSets have some powerfull features for tracking changes to data. DataSets are also wonderfully simple to bind to.
If you code custom business objects and pass around lists, are you prepared to do the work necessary to replicate that functionality? Do you even need to replicate it?
Is your DataLayer adding any value. I can't count the number of times I've seen Business Layer Objects that pass their data to a Data Layer Object that do nothing more than pass the same data through to the Database.
This might be worthwhile if there was a potential for swapping out the Data layer, but that's so rarely the case.
Of late I have become very fond of domain objects that are completely ignorant of the database. There is no DB logic in there at all. The domain objects don't even know about the Data Layer objects.
I don't really care about DataSets, Lists, XML, NHibernate etc. Those are implementation details, the big issue is the persistence ignorance.
That's not to say that persistence ignorance is always the way to go. The project I'm working on right now doesn't use it because I'm working within contraints that were already in place when I arrived. And that's fine.
Worrying about Datasets vs Lists without knowing the big picture is like obsessing over a Sedan or an SUV even though you have no idea where you'll be driving or how many passengers you'll have.
If I could sum up my philosophy on this I would say the following:
Build Apps using the simplest solution possible until you know enough to justify why a more complicated solution gives enough long term advantages to justify itself.
If someone doesn't know whether they should use DataSets or not then they should use DataSets until they figure out why they shouldn't.
Hope that helps.
|
|
|
|
|
Hi people,
Sorry if this isn't the right place to post this. I have posted my message already in the Visual Studio forum but still didn't get any answer. I also posted it in asp.net forums and in MSDN forums and still nothing. I have also searched the web without much success. I am hoping someone here can help me figure out what is going on.
Here is the link to my post in the VS forums: http://www.codeproject.com/Messages/3573698/Issues-with-VS-2010-editor.aspx[^]
I would like to add that I have the same Visual Studio 2010 Premium edition installed on two PCs, one is working well and the other is having the issue mentionned above. I would appreciate any insight or suggestion about this crazy matter.
Thanks,
Talal
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook
|
|
|
|
|
Do not cross-post: if you didn't get an answer the first time it's because no one has the answer or doesn't want to answer: all that happens now is that you are very unlikely to get the answer.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
Anyway I think I know what the problem is.. in HTML edit mode, check which doctype it's targetting. It's a dropdownlist next to the buttons to comment things. So be sure to target the correct doctype.
hope this helps
"My personality is not represented by my hometown."
|
|
|
|
|
Thanks for replying, is this the target validation schema validation you're talking about or is there another dropdown that I need to find?
Talal
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook
|
|
|
|
|
that's indeed the dropdown I'm referring to (wasn't sure about the name; didn't have VS open at the time)
"My personality is not represented by my hometown."
|
|
|
|
|
IS this still an issue? just wanted to know if you've figured it out by now (perhaps a re-install of Visual Studio / your PC will be sufficient )
"My personality is not represented by my hometown."
|
|
|
|
|
Hi
Well, it's my PC at home that is causing me problems. Here at work VS2010 is doing well. I have removed it from my PC at home, in fact I have restored the Norton Ghost image of a clean Windows install. Do you think this could be the issue? The ghost image has a few things installed like VS 2008, SQL 2005, Office 2007 and some other things. Unfortunately I didn't have time to reinstall VS 2010 yet (as you know, it takes ages ) I will keep you updated with what happens when I do install it
Yesterday, I have tried what you suggested with the validation stuff. I wanted to see if I could get the same behavior like what I was getting at home but I didn't get that. I don't think it's due to the doctype because when I switch the target framework to 3.5 the problem disappears (with the same solution). It is quite frustrating honestly as apart from you, I didn't get any reply to any of my posts at asp.net or msdn. Like if nobody encountered that problem before!
The only difference I see with what I have in the office is that I have installed SQL server 2008 before installing VS 2010 here, but I really doubt it could be the issue. Anyway, as you said, it could just be a matter of reinstalling it. Once I do reinstall, I'll let you know what I get
Thanks again!
Talal
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook
|
|
|
|
|
Yeah I know how answering a question sometimes can be difficult for some people. Instead of directly answering the question, precious time is spent by saying how it's not in a correct format :P Nonetheless, questions should be posted in a correct format though.
Anyway, what my suggestion is: try to create a virtual environment to do all of your coding. A solution like VMWare[^] or Virtual PC[^]could save you a lot of headaches. I always work in a Hyper-V setting, which also provides functions to save and revert back to snapshots. This way you can guarantee yourself of having a clean install of your workstation every time. The only thing you'll have to do is save your files on a remote storage device. The chance of something happening that will screw your configuration up is very slim that way.
Nevertheless, I'm looking forward to the cause of your issue was.
Good luck!
"My personality is not represented by my hometown."
|
|
|
|
|
Well, the major issue is that VS 2010 takes a lot of time to install anyway, but I could actually try using Virtual PC and see if it helps me
Now you won't believe what I just discovered now...just now I was playing a bit with VS 2010 here at work and I am also having a weird behavior but not as weird as what I had at home
Anyway, here is what I have noticed. I opened a .aspx page. By default, as you know, it opens in HTML editing mode. So I clicked inside a button tag. Guess what?? in the properties windows, it says: Button1 . Then, in the fields below, I have the proper fields displayed like CausesValidation, CommandName, etc...Note that I DON'T have the events button. Now, I click on Split to split the editor into design and editor mode. I click around the HTML code a bit and then on that same button tag and in the properties now I have Button1 System.Web.UI.WebControls.Button and now I have the events button. Now going back to Source (HTML edit), again I have Button1 !!!
As I recall, I wasn't having that behavior at home, it was always Button1 and I don't remember I was able to get the correct property displayed. As I said before, I will install again and see what happens, but now I know that something is definately not right in this VS 2010
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook
|
|
|
|
|
What happens if you just ignore this behavior, and just continue coding?
"My personality is not represented by my hometown."
|
|
|
|
|
aaargh well it works well in fact, I was just trying some things and it doesn't have an impact on compilation nor on execution. So we can very well live with it. One thing that differs between what I have here and what I have at home is the fact that at home I have this green wave-like line under the name of the web controls, e.g. Button. I don't have that here. But even at home it compiles well, however AJAX wasn't working, meaning when I click, nothing happens on the page. Whereas here, AJAX works. I'm telling you, this VS 2010 is haunted If I can get things to work at home as they are working now in the office, I would be happy, even if it's not perfect
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." --Rich Cook
|
|
|
|
|
|
|
Hello,
I have hosted my web application on the server. It works fine when i have one copy of the Website. My requirement to create multiple copies of websites in the sub directories. I need the same copy of web.config in my subdirectories as well. But when i access website from subdirectory i get the following error
" It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level'"
I know that i need to set the subdirectory as Virtual folder and if i do that in my local IIS it works. But how do i do this on the Web hosting server?
Please help
Thanks
|
|
|
|
|