|
Interop libraries do not need registered, they are .NET assemblies.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
By raw values, I mean the application level values provided by UI controls, such as the Text property on a TextBox. Too often I find myself writing code to check and parse such values before they get used as a business level value, e.g. PaymentTermsNumDays.
I've mitigated a lot of the spade work with rough and ready extension methods like String.ToNullableInt, but we all know that just isn't right. We can't put the whole world on String's shoulders.
Do I look at tasking my UI to provide business values, using a ruleset pushed out from the server app, or open my business objects up a bit to do the required sanitising etc. as they required? Neither of these approaches sits quite right with me; the first seems closer to ideal, but quite a bit of work, while the latter doesn't show much respect to the business objects' single responsibility. The responsibilities of the UI are a closer match.
Between these extremes, I could also just implement another DTO layer, an IoC container with sanitising and parsing services, derive enhanced UI controls, or stick to copy and paste inline drudgery.
|
|
|
|
|
|
|
I have made a window application with MS access database to analysis student performance in his class for each exam that he appeared for.
I have a table named result with following fields:
classname,sectionname,subjectname,exam type ,rollno,studentname and marks.
On one form I have taken crystal reportviewer and 5 comboboxes for selecting class,section, subject, exam(first,second,final or unit tests), and student name.
After selecting these values , click on button to generate graph of his marks for each exam.
I was able to generate graph for one student for any particular class and section.
But the problem is that the graph is not generating for for other exams and other students.
My code is able to give graph for one student and not for other.
Kindly help me in resolving this problem and provide me with some solution.
|
|
|
|
|
Hi
in my .net web application using c# i have used crystal reports in local i can run my project with out any error but when do the same using server its shows some security permisons should be stopped
my error is this....
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Source Error:
Line 28: da = new SqlDataAdapter("select Receiptno,convert(varchar,date,105) date,AdminNo,Purpose,InsourceAmount,sourcedetail from InsourceAccount1", cn);
Line 29: da.Fill(ds);
Line 30: CrystalReportSource1.ReportDocument.SetDataSource(ds.Tables[0]);
Line 31: CrystalReportViewer1.DataBind();
Line 32: //}
Source File: c:\domains\bpofos.com\wwwroot\ssvs\reports\insourcefinalreport.aspx.cs Line: 30
Stack Trace:
Please give some suggestions to rectify this issue.
parden if any mistakes "sorry i m not good at english" please if u can solve send a mail to my id.
Thanks & Regards
sateesh
msateesh.2006@gmail.com
msateesh143@yahoo.com
|
|
|
|
|
Are you aware of any spreadsheet like application (incl. Grids) that could be run on .Net Micro Framework?
Appreciate your information.
Thanks,
Srik
|
|
|
|
|
|
Thanks Jinal, for referring a very good site.
btw, if you come across any of the KB related to a custom made lib that renders a spread sheet like UI using micro framework, pl pass on. I appreciate all your help.
Srikanth
|
|
|
|
|
thanx to the replies for my previous post i registered a dll using gacutil.exe , but now when i'm trying to use it in a project i tried to add it as a reference , but it is not displayed in the dialog box, but that dll is shown in the "c:\windows\assembly", any idea why this happens.
and need another clarification , when we use drag and drop we put the dll in the
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727" for version 2.0. but when we use gacutil.exe the dll is in the "c:\windows\assembly", can anyone explain what is the difference of these two folders and what is the folder called "gac". as i read gac is the folder "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727".
|
|
|
|
|
GAC is Global Assembly Cache, http://msdn.microsoft.com/en-us/library/yf1d93sz(VS.71).aspx[^].
I'm trying to remain positive and encouraging, however if you don't know this, or at least know enough to Google it, then you shouldn't be doing .NET development.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
The listed 'GAC' assemblies shown in the add references is not sourced by the GAC. Visual Studio holds various reference paths in the registry that point to the physical, non-GAC location of the assembly. eg. "C:\Windows\Microsoft.NET\Framework\v2.0.50727" which holds the 2.0 assemblies.
While you can add your path to the registry it would be simpler to just browse to the dll an add the reference.
|
|
|
|
|
thanx . i thought vs 2005 get all the dll which only from GACs
|
|
|
|
|
int n = int.Parse(CustomerID[CustomerID.Length - 1].CustomerID.Substring(4, 3)) + 1;
i try this to generate customer ID but kept telling me the is clash with surburbID becouse i linked surburb in customer table
|
|
|
|
|
Dear Kolisa,
have you tried something like that:
int currentMax = CustomerID.Max(customer => int.Parse(CustomerID.Substring(4, 3)))+1;
I assume you use c# as your choosen language in version 3.x. If not, pls specifiy your problem in more detail. Besides, i suggest to give your variables more distinguished names. Have an array with name CustomerID of type CustomerID is a little bit confusing. Also int.Parse on a substring without null checks or length checks is quite dangerous.
Regards
Jens
When in trouble,
when in doubt,
run in circles,
scream and shout
|
|
|
|
|
You have given very little context. What is surburbID? I assume a foreign key. What does your data structure like? How are you assigning the id? We can't read your mind and we're not working on the same project with you.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
i wrote this code to retrieve size from the database
private void grpSize_Enter(object sender, EventArgs e)
{
string size = "";
if (rdbLrg.Checked)
{
size = "Large";
}
if (rdbReg.Checked)
{
size = "Reg";
}
if (rdbSupa.Checked)
{
size = "Supa";
}
i am using this to pass it to the next from
frmOrderDetails order = new frmOrderDetails(lstItems.SelectedValue.ToString(),rdbSupa.Checked.ToString());
order.Show()
but what it does shows me true when i click the size i want and show false when i click other button i want it to retrieve the size i putted on the database
|
|
|
|
|
can you post code where you retrieve size from database
based on the selection ??
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Why are you passing the ToString of a boolean? That is asking for trouble.
If all the radio buttons are in the same group you should add else before the 2nd and 3rd if statements. No reason to check for all 3 every time.
I also don't understand why you wouldn't pass size to your second form.
|
|
|
|
|
Hi All,
When I try and run my ASP.NET/c# application using VS 2005 the following exception is thrown:
"Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: That assembly does not allow partially trusted callers."
Source Error:
Line 35:
Line 36: AUser UserObject = new AUser();
Line 37: UserObject.VerifyCredentials("...", "...", "...");
Line 38: if (UserObject.IsVerified)
Line 39: {
Source File: p:\...\Login.aspx.cs Line: 37
Stack Trace:
[SecurityException: That assembly does not allow partially trusted callers.]
ASystems.AUser.GetConnection() +0
ASystems.AUser.VerifyCredentials(String DSNEntered, String IDEntered, String PWDEntered) +281
Login.btnLogin_Click(Object sender, EventArgs e) in p:\...\Login.aspx.cs:37
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +78
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +100
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5247
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +247
System.Web.UI.Page.ProcessRequest() +79
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +23
System.Web.UI.Page.ProcessRequest(HttpContext context) +110
ASP.login_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\rrscaseinformation\56b618f4\ea67f999\App_Web_7ndzreci.4.cs:0
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +391
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +76
This exact same code works fine on one of our other machines. Is there some .NET setting that needs to be added/modified on the machine that is recieving this error?
Any help would be greatly appreciated.
Thanks,
Mel
|
|
|
|
|
|
Hi Mark,
Thank you for your reply. I added the AllowPartiallyTrustedCallers attribute to the assembly of the application but this didn't solve the issue.
Let me given more imformation. I have a webApplication that has the dll file (let's call it App1.dll) of a windows application in it's bin folder, which I have also added as a reference. App1.dll is where AUser() is created from and in turn AUser.VerifyCredentials() is called in line 37, which is giving the error.
I added the AllowPartiallyTrustedCallers attribute to the assemblyinfo.cs file of the App1 project and then copied the new App1.dll file to my webApp's bin file again and re-added the reference.
Am I missing a step? Is there something else I need to carryout?
Thanks,
Mel
|
|
|
|
|
MWRivera wrote: a windows application
That could be the key. Not all code can be used in a web application because of security restrictions. What are you trying to use? It could be making a link demand to some API method, directly or indirectly, that is not allowed in a web environment.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
This same code works fine locally on my machine it's when I try and run it from our server.
I guess there is no need for me to run it like this on the server, maybe it will work fine once I publish the webSite in VS.
Thanks for your reply.
Mel
|
|
|
|
|
We have some .Net 2.0 apps, a 3.5 app, and plan to do 4.0 in the future.
Do I need to install all 3 runtimes, or is there a super-version?
4.0 looks really small compared to 3.5, and I think it may only contain stuff specific to 4.
I need an app that will automatically deliver a new BBBBBBBBaBB (beautiful blonde bimbo brandishing bountiful bobbing bare breasts and bodacious butt) every day.
John Simmons / outlaw programmer
|
|
|
|