How to invoke a dll that is dynamically created (during runtime) in a sharepoint site? i am recieving an error that i dont have the load permissions.
Any help on this will be grateful.
Hi everyone...
i have a webservice that i want to test by typing the url in the address bar in the web browser
localhost:1981/myProject/admin/autocomplete.asmx
and when i do this it gives this compilation error
CS0234: The type or namespace name 'Oledb' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)
i know this is because we added this in our web.config
<add namespace="System.Data.Oledb"/>
<add namespace ="System.Data"/>
in the namespaces section.....
when i call this web service through ajax it works but if i try to test it it gives this error.
Is there any way to prevent this?
How to apply limit in php, mongodb when using mapreduce function?
I tried this
$cmd=array(// codition array
"mapreduce" => "user",
"map" => $map,
"reduce" => $reduce,
"out" => array("inline" => 1),
"limit"=>2
);
$db=connect();
$query = $db->command($cmd);// run command
But its not working it gives 2 documents.I can't use limit on sub documents.
If I have 100's of sub documents and then I want paging in sub documents.Then it fails.Is it possible to apply limit on sub documents?
Hi all, I'm trying to send large files using UDP Adobe air to CPP. While transferring large files some packets are missing. How can I retrieve the missing packets data? I'm first of all connecting client(air) with server(cpp) using tcp. After connection establishment I'm starting file transfer. I am planning to get the file missing data using tcp and then resending the missing packets using tcp. Can anybody tell me how can i come to know which packets are missing while transferring. Thank you.
hello friends,
i have
public jsonresult update(studentinfo s)
{
for(i=0;i>0;i++)
{
var x = // i am getting some x so i am checking again
if( x != null)
{
var updateuser = student.update(s.student,"","");
**return json(updateuser.ToString());** // if i keep it here i am getting exceptoin saying not all code paths return value bec this return i can not keep it out for loop bec each and evary updateuser i need to return json..
}
}
}
how to overcome this type of things?
thanks
Exactly I ned to do something like this is this possible?
<%
var Controller = null;
if (Model.ID== "ABC")
{
Controller = "Name";
}
else
{
Controller = "Detail";
}
%>
<% using (Html.BeginForm("edit", Controller, FormMethod.Post, new { @id="exc-" + Model.SID}))
{%>
<%= Html.Summary(true)%>
is this possible?
if i do I am getting exception...
ERROR: Cannot assign to an implicitly-typed local variable
Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.
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.InvalidOperationException: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.
in jquery gird on button click i am displaying something like 28000 rows?
I know some of them are sujjested to define the JsonmaxLength in web config file.. but its not working for me?
can anybody tell me about this?
thanks
I am trying this code to fetch data from wsdl.
Querying the website for the zipid("60630") works fine but in my code it gives the error as
"Invalid ZIP"
wsdlFile = 'http://wsf.cdyne.com/WeatherWS/Weather.asmx?wsdl'
wsdlObject = WSDL.Proxy(wsdlFile)
wsdlObject.show_methods()
zipid = "60630"
result = wsdlObject.GetCityWeatherByZIP(ZIP=zipid)
print result[1]
Can someone please help whats wrong here and why the code is not working correctly.
Thanks !!!
Invoke does not exist in the current context. The same method was not giving any error in Form.cs class but when I used in other class in same project it gives error. i am using threading on forms control.
private void UpdateText(object fileName)
{
if (Textbox.InvokeRequired)
{
UpdateTextCallback back = new UpdateTextCallback(UpdateText);
this.Invoke(back, new object[] { fileName });
}
}
I have some code in asp.net ( kindly given by someone else ) to query AD to get user name and email etc.
using System.DirectoryServices;
using System.DirectoryServices.ActiveDirectory;
using ActiveDs;
DirectorySearcher search = new DirectorySearcher(new DirectoryEntry(), string.Format("(samaccountname={0})", id));
if (search == null)
return id;
if (search.FindOne() == null)
return id;
DirectoryEntry usr = search.FindOne().GetDirectoryEntry();
IADsUser oUsr = (IADsUser)usr.NativeObject;
return string.Format("{0} {1}", usr.Properties["givenname"].Value, usr.Properties["sn"].Value);
However this requires impersonation with an id that's required to be changed every 2 weeks and then updated in the web.config which is often forgotten
Is there any non impersonation code to achieve the same result ?
UPDATE - it's a config tool and it looks up name, email id etc.
I like the service a/c idea
Q - How is it possible to run ( impersonate ) just the AD code with a "service" a/c ? any samples/code ?
how do you impersona
applications which require .NET 2.0 and 3.5 are not running after installing VS 2010 which comes with .NET 4.0
Please help me how can i make .NET 2.0 and 3.5 running using .NET 4.0.........
not will be install both .NET 3.5 and .NET 2.0 along with .NET 4.0....
Thanks in advance....
Hello friends..
colNames: ['A','B','C','D'],
colModel: [
{ name: 'A', index: 'A', width: 90 },
{ name: 'B', index: 'B', width: 100 },
{ name: 'C', index: 'C', width: 70 },
{ name: 'D', index: 'D', edittype: 'select', width: 100, editoptions: { value: { 1: 'Yes', 2: 'No'}} }
],
My concersn here is.. I am displying A B C D values from db2... for Last Column D I need to put defalut drop down list for all the rows.
Thanks can any body help me out..
thanks
Hello All,
XmlSerializer serializer = new XmlSerializer(typeof(IxComment));
System.IO.StringWriter aStream = new System.IO.StringWriter();
serializer.Serialize(aStream,Comments);
commentsString = aStream.ToString();
Here the commentsString has the the following element in it
<IxComment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
Is there any possibility to interchange the xsi and xsd attribute and get the element as shown below
<IxComment xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
Will this cause any other issue?
Looking for any decent grid styles designer with standard features such as
select columns from a catalog
Change the ordering of columns
set column font/bold/italic etc.
set column styles - fixed left / right
etc.
Have done it before but don't have access to that code
Looking for any near ready to use sample before reinventing the wheel :)
preferably winforms but can use wpf too
I have a remote tracking branch tracked locally in my local repository using 'git branch -b branch-name origin/branch-name'.
My remote branch is test2/test2 (origin/branch-name) which is being tracked locally as test2.
The origin is also named test2.
I haven't checked-out my local tracking branch test2.
When i do a 'git pull origin remote-branch:local-tracked-branch' i get this error
[test2]$ git pull test2 test2:test2
From /gitvobs/git_bare/test2
! [rejected] test2 - test2 (non fast forward)
Whereas when i checkout my local tracking branch test2
and do pull 'git pull origin local-tracked-branch' i don't get the error
and i do a pull using 'git pull test2 test2'
From /gitvobs/git_bare/test2
* branch test2 - FETCH_HEAD
Auto-merging a.txt
Automatic merge failed; fix conflicts and then commit the result.
i know that adding a + (git pull test2 +test2:test2) would help but it overwrites local changes.
So how do i know which of my local branches are created by me locally using 'git branch new-branch-name' or tracked locally from remote branches using git branch -b branch-name origin/branch-name'?
Hi Friends,
I used Vaadin Table component in my application and i set a page length to 15, Length of the Table is not consistent in different screens resolutions . For example in 1440 x 900 resolution height of the table is big but in 1280 x 1024 resolution the height of the table is less . I don't know how to solve this problem.Can any one help me to sort out this problem.
Thanks in advance.
I have a method which compares two objects and returns a list of all the property names which are different.
public static IList<string> GetDifferingProperties(object source, object)
{
var sourceType = source.GetType();
var sourceProperties = sourceType.GetProperties();
var targetType = target.GetType();
var targetProperties = targetType.GetProperties();
var properties = (from s in sourceProperties
from t in targetProperties
where s.Name == t.Name &&
s.PropertyType == t.PropertyType &&
s.GetValue(source,null) != t.GetValue(target,null)
select s.Name).ToList();
return properties;
}
For example if I have two classes as follows:
public class Address
{
public string AddressLine1 { get; set; }
public string AddressLine2 { get; set; }
public string City { get; set; }
public string State { get; set; }
public string Zip { get; set; }
}
public class Employee
{
public string FirstName { get; set; }
public string MiddleName { get; set; }
public string LastName { get; set; }
public Address EmployeeAddress { get; set; }
}
I am trying to compare the following two employee instances:
var emp1Address = new Address();
emp1Address.AddressLine1 = "Microsoft Corporation";
emp1Address.AddressLine2 = "One Microsoft Way";
emp1Address.City = "Redmond";
emp1Address.State = "WA";
emp1Address.Zip = "98052-6399";
var emp1 = new Employee();
emp1.FirstName = "Bill";
emp1.LastName = "Gates";
emp1.EmployeeAddress = emp1Address;
var emp2Address = new Address();
emp2Address.AddressLine1 = "Gates Foundation";
emp2Address.AddressLine2 = "One Microsoft Way";
emp2Address.City = "Redmond";
emp2Address.State = "WA";
emp2Address.Zip = "98052-6399";
var emp2 = new Employee();
emp2.FirstName = "Melinda";
emp2.LastName = "Gates";
emp2.EmployeeAddress = emp2Address;
So when I pass these two employee objects to my GetDifferingProperties method currently it returns FirstName and EmployeeAddress, but it does not tell me which exact property (which in this case is Address1) in the EmployeeAddress has changed. How can I tweak this method to get something like EmployeeAddress.Address1?
Hi EveryOne,
I am looking for any tool or approach using which I can do UI unit test for iPhone application, I am aware of SenTestCase framework however which is used to do that testing for code I am looking for UI unit testing.
Any suggestion will be great help to me.
Thanks in advance.
Regards,
Satish.
I followed the instructions as given in Using The Notifications API. Also I faced many problems like the below, because I added the document.querySelector() inside the <head> part:
Uncaught TypeError: Cannot call method 'addEventListener' of null
Now I have the below source, where I am able to Check Notification Support, and Check Notification Permissions links.
Guide me how to bring in notifications in a simpler way. Also, I tried this:
$("#html").click(function() {
if (window.webkitNotifications.checkPermission() == 0) {
createNotificationInstance({ notificationType: 'html' });
} else {
window.webkitNotifications.requestPermission();
}
});
Now I am stuck with this source. I need to generate HTML & Simple Notifications. Am I missing something? Please guide me.
Source:
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>Desktop Notifications</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
function checkNotifications() {
if (window.webkitNotifications)
alert("Notifications are supported!");
else
alert("Notifications are not supported for this Browser/OS version yet.");
}
function createNotificationInstance(options) {
if (window.webkitNotifications.checkPermission() == 0) { // 0 is PERMISSION_ALLOWED
if (options.notificationType == 'simple') {
return window.webkitNotifications.createNotification('icon.png', 'Notification Title', 'Notification content...');
} else if (options.notificationType == 'html') {
return window.webkitNotifications.createHTMLNotification('http://localhost/');
}
} else {
window.webkitNotifications.requestPermission();
}
}
</script>
<style type="text/css">
* {font-family: Verdana, sans-serif;}
body {font-size: 10pt; margin: 0; padding: 0;}
p {margin: 5px;}
a {color: #09f; text-decoration: none;}
a:hover {color: #f00;}
</style>
</head>
<body>
<p><strong>Desktop Notifications</strong></p>
<p>Lets see how the notifications work in this browser.</p>
<p>
<a href="#" onclick="checkNotifications(); return false;">Check Notification Support</a>.
Next <a href="#" onclick="alert('Notifications are ' + ((window.webkitNotifications.checkPermission() == 0) ? '' : 'not ') + 'allowed!'); return false;">Check Notification Permissions</a>
and if permissions are not there,
<a href="#" onclick="window.webkitNotifications.requestPermission(); return false;">Request Permissions</a>.
Create a
<a href="#" id="text">Simple Notification</a>
or
<a href="#" id="html">HTML Notification</a>.
</p>
</body>
<script type="text/javascript">
document.querySelector("#html").addEventListener('click', function() {
if (window.webkitNotifications.checkPermission() == 0) {
createNotificationInstance({ notificationType: 'html' });
} else {
window.webkitNotifications.requestPermission();
}
}, false);
document.querySelector("#text").addEventListener('click', function() {
if (window.webkitNotifications.checkPermission() == 0) {
createNotificationInstance({ notificationType: 'simple' });
} else {
window.webkitNotifications.requestPermission();
}
}, false);
</script>
</html>