|
It is always best to check the documentation first.
Use the best guess
|
|
|
|
|
It looks like you're trying to access a UNC path. The path needs to start with \\ , but for a C# string, you need to escape the \ character. Therefore, your path should be:
string yol = "\\\\10.8.15.20\\DosyaAktarim";
Alternatively, you could use a verbatim string[^]:
string yol = @"\\10.8.15.20\DosyaAktarim";
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
How Do I Include References in an ASP.NET web site?
In a typical C# program, when you want to include a name space, it is fairly easy to inculde the reference in the Visual Studio project.
I am trying to rebuild a asp.net C# web site from scratch -- that is modeled after an already existing asp.net C# web site. In the preexisting project, the .aspx files have tags such as "<asp:..." and "<tel:..." and "<sue:...". I understand that the <asp,,,> components probably do not need any special declaration and the project will run fine immediately after construction. I also unserstand what the "tel" tags are for (it is for a plug-in that is part of a third party compoenent that actually adds content to Visual Studio so that I can create a new project of that type).
But the "sue" referrs to a dll that is proprietory to where I work. I need to include that DLL (and/or pdb file) in a new project. How do I do this?
|
|
|
|
|
I think it is custom control,add it in your custom tool box ,
|
|
|
|
|
Are you using a Web Application project or a Web Site project?
For a WAP, you should be able to add the reference in the same way as any other C# project.
For a WSP, you might need to right-click on the project to get the "Add Reference" option, or use the "Website" menu. Alternatively, you could just copy the dll to the bin folder.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hello Xarzu
simply right click on your project and select add reference
it will give you browsing option from here specify path of your dll and add it...
hope this will help you
|
|
|
|
|
On windows 7, I have developed an application that read a template in word document format and create new word file by replacing place holders from template. My application is working fine on my local system, on server it log exception message that
----------------------------------------------------
Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).
Source
--------------------------------------------
It shows exception on below line-
Microsoft.Office.Interop.Word.ApplicationClass wordApp = new Microsoft.Office.Interop.Word.ApplicationClass();
Please do help.
|
|
|
|
|
Start by reading Microsoft KB article 257757:
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
If you're still determined to use Office in this manner, you'll need to use the dcomcnfg tool on the server to grant launch and activation permissions to the identity used by the application pool.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Calling Office components from server code is clearly something Microsoft does not support. Microsoft support link : http://support.microsoft.com/kb/257757 .
This article discusses the complications that developers may face
|
|
|
|
|
Hi Everybody,
I have very specific requirement. I need to show river bed in interactive 3D format in ASP.net web based application. I have never worked on 3D. Please let me know what 3D engine I can use to create interactive web application. This website should be compatible with all major browsers.
thanks,
Umrahi
If you have faith in the cause and
the means and in God, the hot
Sun will be cool for you.
|
|
|
|
|
You mean like parametric 3D?, or just a node map?,
Do you have to rotate the river bed, showing the top and bottom?
Maybe your mean a 2D drawing or image. You need to be more specific in the term 3D. 3D could just mean wearing 3D glasses so the image stands out at you.
[EDIT]
I use 3D parametric CAD software at night to create parts and assemblies on the side as a hobby. Programs like GeoMagic Design use Direct X 9.0 as a canvas for drawing and displaying the parts. I think on Macs they use Open GL.
You should really Google the subject, because I've been here for 5 years, and your the first to ask.
[EDIT 2]
I guess there is such a thing. A HTML5 3D Parametric Open GL Support, control, module or something that will display a 3D Parametric file in multiple formats supported by SolidWorks, I forget the name of the standard format for parametric files, but it's the same used for 3D printers.
Hard part is making the drawing file. I know movies use Geomagic to scan a scene, and convert it to a node map, and then fill in the nodes to create a parametric map, for coloring and rendering.
Well, more fun that writing code for a living.
https://www.youtube.com/watch?v=a3G4bKnZ5kA[^]
[blog on the subject of 3DOpenGl and HTML5^]
modified 15-Jul-13 20:03pm.
|
|
|
|
|
How do you clear temporary files in an ASP.NET website project?
I have been building and rebuilding an ASP.NET program.
I made the horrible mistake, I think, of recently copying the published content back to the folder I was developing.
So now I have an unusual error when I build the code. It says That there is a duplicate definition in one file in a temporary directory with anohter file in a temporary directory.
Error 3 The type 'ChildEventHandler' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files...\b90cc7a4\28d266b\assembly\dl3\c4cf1ea3\b6e4b808_ef7cce01\App_Code.DLL' and 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files...\b90cc7a4\28d266b\App_Code.asx5jp5d.dll' C:\inetpub\wwwroot...\Resources\usercontrols....ascx.cs 11 18 C:......\
I removed project and file names, of course, but this is basically what the error says.
Since the error is with temporary files, what should I do?
I do not see a "clear" option in visual studio to clear out the files of a compile.
http://i.stack.imgur.com/VgT2J.png
|
|
|
|
|
Try to clean the solution then rebuild it.
Help people,so poeple can help you.
|
|
|
|
|
The answer lies in the error message.
Navigate to:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files
and delete the files there.
<edit -="" fix="" typo="">
Every time you think, you weaken the nation.
|
|
|
|
|
I have created web application in asp.net. After session.Abandon() i am able to end the session in which i cannot go back and it will redirect to loginpage. But if i run in Google Chrome browser it is not working and if i click back it will come priviously opened page with data.
how to end the session of chrome browser in asp.net.
If anybody knows, please reply me.
Thanks in advance.
|
|
|
|
|
I think you have to abandon and remove all
Session.removeAll();
|
|
|
|
|
I did that also. It is not working for Google Chrome browser.
|
|
|
|
|
Technically session.removeAll works. Keep in mind that it's a server side call, and will erase all the session values on the web server.
Now if the browser still honors the session value, or thinks that the session value is valid, then that's a browser issue, or something else on the server is keeping the session value alive.
So you make a session in a test page, that contains a word or something, and click a button to remove all, and see if the session is erased., and play around with it.
I know that in certain modes, the session value will write a cookie on the client, with the session values. Using Firefox to examine the cookie values is useful to confirm the removal of the session value.
Chrome has alot of bugs in it, and became very bloated with code. It could just be a Chrome issue. That's out of your control, nothing you can do about it.
[EDIT]
Maybe it's the way you implemented the session, eg.
Dim m_context as httpcontext = httpcontext.current
m_context.session.add("Login", true)
if (true = m_context.session("Login") then
m_conetxt.response.redirect("admin.aspx")
End if
or perhaps the correct context was not used to create or remove the session, or the spelling of the session name does not exactly match.
Don't forget to delete your browser cache for a true test.
|
|
|
|
|
it's been several days since I am trying to resolve this issue. I have a page that is a mail inbox in the website. You can send messages to your friends from the list like on facebook.
It has AJAX code in a js file, 2 ashx files, and aspx, aspx.cs files. I was using facebox pop up when a user wanted to send a message to a friend. Now I changed the UI removed facebox and added a masterpage so that now the page is like any other page on the site. But after adding a masterpage to messages.aspx page the values of HttpContext become null after I click on send message. They are working fine when the page first loads that shows friends list and previous messages. It's when I fire a js function to save the message entered by clicking send that it's lost.
in message.aspx page I use 3 hidden fields:
<script>
function SavePostedMessage() {
var SenderAccountID = $("#hdnSenderID").val();
var ReceiverAccountID = $("#hdnReceiverID").val();
var Days = $("#hdnDays").val();
var body = GetmessageData();
if (body != null || body != "")
SaveMessageInDatabase(SenderAccountID, ReceiverAccountID, body, Days);
}
</script>
<asp:HiddenField ID="hdnSenderID" runat="server" />
<asp:HiddenField ID="hdnReceiverID" runat="server" />
<asp:HiddenField ID="hdnDays" runat="server" />
<a style="cursor: pointer;" onclick="SavePostedMessage()">
<div style="height: 25px; width: 85px; float: left; margin-top: 28px; padding-top: 5px;
background: #01B2E5; text-align: center;" id="uploadifyContainer"> Send
In messages.aspx.cs I put in page_load the code to register a js function: ScriptManager.RegisterStartupScript(this, typeof(string), "Play", "javascript:GetMessageConversation('" + Request.QueryString["AccountID"] + "','" + _userSession.CurrentUser.AccountID + "','7');", true);
In Ajax.js I defined function GetMessageConversation(SenderAccountID, ReceiverAccountID, Days) {
$("#hdnSenderID").val(SenderAccountID);
$("#hdnReceiverID").val(ReceiverAccountID);
$("#hdnDays").val(Days);
$("#divPostComment").show();
setSelected("trUser" + ReceiverAccountID);
$.ajax({
type: "POST",
url: "/MessageFacebox/GetMessageConversation.ashx",
data: 'SenderAccountID=' + SenderAccountID + "&ReceiverAccountID=" + ReceiverAccountID + "&Days=" + Days,
success: function (data) {
$('#messageconversationdata').html(data);
Scrollbottom();
},
error: function (errordata) {
alert('Sorry some error occurred');
}
});
}
function SaveMessageInDatabase(SenderAccountID, ReceiverAccountID, Body, days) {
$.ajax({
type: "POST",
url: "/MessageFacebox/SaveMessage.ashx",
data: 'SenderID=' + SenderAccountID + "&ReceiverID=" + ReceiverAccountID + "&Body=" + Body,
success: function (data) {
GetMessageConversation(SenderAccountID, ReceiverAccountID, days);
},
error: function () {
alert('Sorry some error occurred');
}
});
In GetMessageConversation.ashx context.Request.Form["SenderAccountID"] and context.Request.Form["ReceiverAccountID"] return stored values
Account senderAccount = _accountRepository.GetAccountByAccountID(Convert.ToInt32(context.Request.Form["SenderAccountID"]));
Account receiverAccount = _accountRepository.GetAccountByAccountID(Convert.ToInt32(context.Request.Form["ReceiverAccountID"]));
But in SaveMessage.ashx Account senderAccount = _accountRepository.GetAccountByAccountID(Convert.ToInt32(context.Request.Form["SenderID"])) ; Account receiverAccount = _accountRepository.GetAccountByAccountID(Convert.ToInt32(context.Request.Form["ReceiverID"] ));
context.Request.Form["SenderID"] and context.Request.Form["ReceiverID"] have null values.
the first one loads when the page is first accessed. The save function is called when user enters a message and click on send button in messages.aspx
All works fine without a master page. Once I add masterpage file to messages.aspx the code stops working.
Thanks in advance.
|
|
|
|
|
Did you test your data before transmuting, so you can isolate the problem between the client or server side?
alert('SenderAccountID=' + SenderAccountID + "&ReceiverAccountID=" + ReceiverAccountID + "&Days=" + Days,);
When changing to a masterpage, the id's change on the textboxes and labels, so a Ct100 is added as a prefix to the id of the element.
so you can change the id mode of the control to static, or change the way jquery finds the element to a wildcard prefix and then the id name.
|
|
|
|
|
Thanks for responding. That was the issue.
|
|
|
|
|
Hi All
I am facing one issue while downloading .xls file in my report page.I am describing the details below
Issue:
--> I am displaying some companies details in report page as table rows and columns like “<table><tr><td>company name……”
--> In report page I am having Download button ,when click on download button my companies details table data need to be download as .xls(Excel) file.
--> when clicking on download button its showing one alert box with following message "The file you are trying to open,XXXX,is in different format than specified by the file extension.Verify that the file is not corrupted and is from a trusted source before opening the file"
--> The below code I written for downloading file in my page.
Var outputhtml="";
outputhtml +="";
outputhtml +="";
outputhtml +="";
outputhtml +="";
Response.ContentType = "application/vnd.ms-excel";
Response.AddHeader( "Content-disposition","attachment; filename=My Company Details.xls");
Response.write(outputhtml);
Please help me to solve this issue.
Thanks in advance.
modified 14-Jul-13 21:48pm.
|
|
|
|
|
That could be a message from Excel. When you saved data in the new format and use the extension .xls instead of .xlsx, Excel will warn you. And similar the other way round. So just try
Response.AddHeader( "Content-disposition","attachment; filename=My Company Details.xlsx");
and make sure your Excel file is correctly named.
|
|
|
|
|
Hi,
I am beginning with asp.net and I have downloaded the following: VS Express 2012 (with asp.net 4.5 ) and sql server express from www.asp.net/downloads
I want to download some simple asp.net (c#) projects which will give me a basic understanding of the fundamentals of asp.net. e.g simple tricks and tips to do tasks in asp.net. Please advice.
Thanks !
|
|
|
|
|
|