|
It turns out that if you install any of the Exchange stuff, it installs the CDOEX.dll. Well, apparently, this dll is now used for all of the CDO.Message stuff from the COM side of things, and overwrites the CDOSYS.dll. Unfortunately, .NET is bound to the CDOSYS.dll, so it blows up when you try to send a message. The trick is to unregister the CDOEX.dll and register the CDOSYS.dll using regver32.exe.
Here is a translated article discussing this in detail.
Get it[^]
Remember, always use caution when mucking with the registry.
Regards,
Satips.
|
|
|
|
|
Its giving me an access error on the documents folder where I am trying to upload my files. (again, I am able to upload from my local website to this webserver just fine. through the server URL it gives this error)
I tried granting Read Write permission on the docs as well as iddocs. Please let me know if I missing some configurations.
I added ASPNet account to the folder where I am trying to store the files. I set permissions to full for ASPNet account on the docs/iddocs folder, gave full permission to ASPnet account on my web application, also on wwwroot. I checked that web,config for my web application has the tag
<identity impersonate="true"> Still no luck. I get the same error.
Appreciate your help.
Regards,
Rekha.
Server Error in '/webforms/ids' Application.
--------------------------------------------------------------------------------
Access to the path '\\<webserver>\wwwroot\docs\iddocs\Ymm\Summary.png' is denied. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.UnauthorizedAccessException: Access to the path '\\<webserver>\wwwroot\docs\iddocs\Ymm\Summary.png' is denied.
ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true">, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.
To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.
Source Error:
Line 75: {
Line 76: SummaryFilepath.Text = ServerDocLocation + SummaryFileName;
Line 77: Summary_Attachment.SaveAs(ServerDocLocation + Summary_Attachment.FileName);
Line 78: }
Line 79: else
Source File: c:\Inetpub\wwwroot\webforms\ids\IDForm.aspx Line: 77
Stack Trace:
[UnauthorizedAccessException: Access to the path '\\<webserver>\wwwroot\docs\iddocs\Ymm\Summary.png' is denied.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +2014179
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +998
System.IO.FileStream..ctor(String path, FileMode mode) +65
System.Web.HttpPostedFile.SaveAs(String filename) +87
System.Web.UI.WebControls.FileUpload.SaveAs(String filename) +22
ASP.idform_aspx.Wizard1_NextButtonClick(Object sender, WizardNavigationEventArgs e) in c:\Inetpub\wwwroot\webforms\ids\IDForm.aspx:77
System.Web.UI.WebControls.Wizard.OnNextButtonClick(WizardNavigationEventArgs e) +105
System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) +453
System.Web.UI.WebControls.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) +17
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
|
|
|
|
|
RDayalu wrote: System.UnauthorizedAccessException:
An UnauthorizedAccessException exception is thrown when the operating system denies access because of an I/O error or a security error.
Make sure you have sufficient privileges to access this resource.
If you are attempting to access a file or registry key, make sure it is not read-only.
Hope this will solve your problem.
Regards,
Satips.
|
|
|
|
|
In my prject I used the stored procedure which I sent you ealier which calculates the date differnce also.
.I attached that datasource to gridview. my gridview looks like this.
Css Field received Id Wait Time
6/13/2007 12:38 am 1123 3d 21h 45m
6/13/2007 10:45 1124 2d 30h 07m
In "CssField" in GridView I have to use colors based on the following condidtion
If Wait Time >= 24 hours then color = Red
>= 20 hours Orange
>= 16 hours yellow
Also How can I use the above condition for putting different colors in all rows based on WaitTime field.
The following is my CSS class.
.sdgStatusRed {
background-color: Red;
height: 25px;
width: 25px;
}
.sdgStatusOrange {
background-color: Orange ;
height: 25px;
width: 25px;
}
.sdgStatusYellow {
background-color: Yellow;
height: 25px;
width: 25px;
}
.sdgStatusGreen {
background-color: Green;
height: 25px;
width: 25px;
}
.sdgStatusBlue {
background-color: Blue;
height: 25px;
width: 25px;
}
seema
|
|
|
|
|
If you have ccs classes for this, then make your CssClass equal to a method call which passes in the value of the WaitTime field. Then, in your code behind, return the correct string ( class name ) based on the value passed in.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I want values entered into a textbox to appear in currency format with comma separator and 2 decimal places, when the textbox lost focus
pls help
t.aransiola
|
|
|
|
|
As you're using ASP.NET, you'll need to handle the focus lost event in javascript and write code to format the string there.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
I have the following query. my message field is of datatype text. But I want to grag just first 50 characters + ...
from that "message" field. How can I do that.
The following is my sql statement
select tck.ticketid,tckmsg.message
from tbtickets tck inner join tbticketsmessages tckmsg
on tck.ticketid = tckmsg.ticketid and tcktstatusId = 1
seema
|
|
|
|
|
seemamltn wrote: How can I do that.
Maybe by posting it to the correct forum. Try SQL / ADO / ADO.NET
only two letters away from being an asset
|
|
|
|
|
Hello all,
I have a small site that needs to hit Active directory. I added a project reference to my website for System.DirectoryServices. I also added a using statement to the code behind page as you would normally expect. Now, however, I get an error when I try to run a page that is dependent on a file in App_Code that references the System.DirectoryServices assembly. Even though the assembly is referenced by the project, it still isn't picking up the reference for the items in App_Code. Any ideas?
Thanks,
Will
|
|
|
|
|
What error it says when you run your application?
Regards,
Satips.
|
|
|
|
|
Whoops. I guess I should have included that information:
Server Error in '/' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0234: The type or namespace name 'DirectoryServices' does not exist in the namespace 'System' (are you missing an assembly reference?)
Source Error:
Line 8: using System.Web.UI.WebControls.WebParts;
Line 9: using System.Web.UI.HtmlControls;
Line 10: using System.DirectoryServices;
Line 11:
Line 12: namespace PearWeb.App_Code
Source File: c:\SVN\PEAR\Source\PearWeb\App_Code\ADHelper.cs Line: 10
|
|
|
|
|
Just Remove the Reference from that folder and once again add the reference to that folder and try again.
Regards,
Satips.
|
|
|
|
|
|
Assembly references are added to projects, not folders.
only two letters away from being an asset
|
|
|
|
|
|
The strange thing (to me, at least), is that the error is a compilation error. Since the System.DirectoryServices dll is in the GAC, it looks like it would be trivial to retrieve from a web application for compilation purposes. I also tried adding a line in the <assemblies> key of the web.config, but I only succeeded in making the app crash earlier, as it says it can't load the assembly at all. The odd thing is that I can use exactly the same code in a web page, and there is no problem at all.
|
|
|
|
|
Ok.... I fixed it, but I don't understand why my fix worked. I set Copy Local on the reference to true. Then, I rebuilt and suddenly it works. Ummmm....Why?
|
|
|
|
|
When I said that it works, I meant that it doesn't blow up. However, the stuff in App_Code is no longer accessible from the rest of the project. I think I might do better to just switch over to a web application project or something.
This makes me want to switch over to ROR instead of bothering with C#, as it seems that I'm spending more time trying to make Visual Studio play nice than I am actually coding. It's hitting the point that it would be an improvement for me to just develop using a terminal and a text editor, which is what I use in Ruby.
Visual Studio 2005 reminds me of Rain Man a little more every time I use it. Sure, it can do impressive stuff that others can't do without a lot more work, but it has an apoplectic meltdown if you don't buy your underwear at Target.
|
|
|
|
|
Can Crystal Report show dynamic picture?
Is anyone know?
thank you
|
|
|
|
|
Use a typed DataSet, put the graphic in the DataSet and use the DataSet as DataSource for the Crystal Report.
So we can make it as Dynamic.
Hope this will help you.
Regards,
Satips.
|
|
|
|
|
Hi, I've found the function below when I was searching for ways to prevent SQL Injection. Basically it is supposed to remove the words select, drop, inser, delete, and other characters that can affect your database. I'm new to VB.NET and ASP.NET so please bear with me.
function killChars(strWords)
dim badChars
dim newChars
badChars = array("select", "drop", ";", "--", "insert", "delete", "xp_")
newChars = strWords
for i = 0 to uBound(badChars)
newChars = replace(newChars, badChars(i), "")
next
killChars = newChars
end function
I get the error message "array is a type and can not be used as an expression". I also noticed that the datatype for the variables badChar and newChars were not specified and VS2003 says the variable "i" in the for loop was not declared. I have seen vb.net For loops used the way its being used in the function above without generating errors. Please help clarify, thank you in advance for your help.
|
|
|
|
|
If you want to prevent SQL injection attacks then don't accept SQL statements period, use store procedures or parameterized queries.
only two letters away from being an asset
|
|
|
|
|
Use Stored Procedure.
Then you will not get these error.
Regards,
Satips.
|
|
|
|
|
Gee, wish I had said that...oh I did, 1 hour 20 minutes ago.
only two letters away from being an asset
|
|
|
|